summaryrefslogtreecommitdiff
path: root/rt/devel/tools/rt-attributes-editor
diff options
context:
space:
mode:
Diffstat (limited to 'rt/devel/tools/rt-attributes-editor')
-rw-r--r--rt/devel/tools/rt-attributes-editor17
1 files changed, 5 insertions, 12 deletions
diff --git a/rt/devel/tools/rt-attributes-editor b/rt/devel/tools/rt-attributes-editor
index 92998a472..cc69a02b0 100644
--- a/rt/devel/tools/rt-attributes-editor
+++ b/rt/devel/tools/rt-attributes-editor
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -49,19 +49,12 @@
use strict;
use warnings;
use Term::EditorEdit;
-use Getopt::Long;
-my ($help, $key, $id);
-GetOptions('help|h' => \$help, 'key|k=s' => \$key, 'id=i' => \$id);
-if ( $help || !$id ) {
- require Pod::Usage;
- Pod::Usage::pod2usage({ verbose => 2 });
- exit;
-}
+use RT::Interface::CLI qw(Init);
+my ($key, $id);
+Init('key|k=s' => \$key, 'id=i' => \$id);
-require RT;
-RT::LoadConfig();
-RT::Init();
+Pod::Usage::pod2usage({ verbose => 2 }) unless $id;
require RT::Attribute;
my $attr = RT::Attribute->new( RT->SystemUser );