X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fdevel%2Ftools%2Frt-attributes-editor;h=cc69a02b01cea28d8afb6a40b6870a1c47dc4596;hb=3fc0a546caf38b444b63744726c5080ce5d9bbbb;hp=15436acc3ee9fa766bc333e4a55285aa212d1b5c;hpb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e;p=freeside.git 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 );