[Bps-public-commit] r19088 - in RT-Extension-MergeUsers/trunk: bin

falcone at bestpractical.com falcone at bestpractical.com
Tue Apr 7 17:28:58 EDT 2009


Author: falcone
Date: Tue Apr  7 17:28:58 2009
New Revision: 19088

Modified:
   RT-Extension-MergeUsers/trunk/   (props changed)
   RT-Extension-MergeUsers/trunk/Makefile.PL
   RT-Extension-MergeUsers/trunk/bin/rt-merge-users

Log:
 r46244 at ketch:  falcone | 2009-04-07 16:50:16 -0400
 * use Module::Install::Substitute to set up paths for us


Modified: RT-Extension-MergeUsers/trunk/Makefile.PL
==============================================================================
--- RT-Extension-MergeUsers/trunk/Makefile.PL	(original)
+++ RT-Extension-MergeUsers/trunk/Makefile.PL	Tue Apr  7 17:28:58 2009
@@ -10,4 +10,11 @@
 
 requires        ('Hook::LexWrap');
 
+my ($lib_path) = $INC{'RT.pm'} =~ /^(.*)[\\\/]/;
+my $local_lib_path = "$RT::LocalPath/lib";
+substitute( { RT_LIB_PATH => join( ' ', $local_lib_path, $lib_path ), },
+    'bin/rt-update-merged-users',
+    'bin/rt-merge-users',
+);  
+
 WriteAll();

Modified: RT-Extension-MergeUsers/trunk/bin/rt-merge-users
==============================================================================
--- RT-Extension-MergeUsers/trunk/bin/rt-merge-users	(original)
+++ RT-Extension-MergeUsers/trunk/bin/rt-merge-users	Tue Apr  7 17:28:58 2009
@@ -3,12 +3,14 @@
 use strict;
 use warnings;
 
-my $usage = "usage: perl -I/opt/rt3/local/lib -I/opt/rt3/lib $0 <user> <into>";
+my $usage = "usage: perl $0 <user> <into>";
 
 my ($from, $into) = @ARGV;
 die "\n$usage\n" unless $from && $into;
 
-eval { require RT } or die "$@\n\n$usage\n";
+### after: use lib qw(@RT_LIB_PATH@);
+use lib qw(/opt/rt3/local/lib /opt/rt3/lib);
+use RT;
 RT::LoadConfig();
 RT::Init();
 



More information about the Bps-public-commit mailing list