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-editor15
1 files changed, 4 insertions, 11 deletions
diff --git a/rt/devel/tools/rt-attributes-editor b/rt/devel/tools/rt-attributes-editor
index 15436ac..cc69a02 100644
--- a/rt/devel/tools/rt-attributes-editor
+++ b/rt/devel/tools/rt-attributes-editor
@@ -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 );