summaryrefslogtreecommitdiff
path: root/rt/devel/tools/rt-attributes-editor
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-09 22:18:55 -0700
commit1c538bfabc2cd31f27067505f0c3d1a46cba6ef0 (patch)
tree96922ad4459eda1e649327fd391d60c58d454c53 /rt/devel/tools/rt-attributes-editor
parent4f5619288413a185e9933088d9dd8c5afbc55dfa (diff)
RT 4.2.11, ticket#13852
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 15436acc3..cc69a02b0 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 );