X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fdevel%2Ftools%2Frt-attributes-editor;h=cc69a02b01cea28d8afb6a40b6870a1c47dc4596;hb=ee7f41f5c1c1a078cba26e1c2ddd1ec8c6ffc337;hp=92caeaf128c4d608395a9128b239f42d9010d0a2;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/devel/tools/rt-attributes-editor b/rt/devel/tools/rt-attributes-editor index 92caeaf12..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-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (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 );