diff options
Diffstat (limited to 'jobqueue.pl')
-rwxr-xr-x | jobqueue.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jobqueue.pl b/jobqueue.pl index ebc9118e8..011d0ff87 100755 --- a/jobqueue.pl +++ b/jobqueue.pl @@ -10,15 +10,15 @@ use 5.10.1; use strict; use warnings; -use Cwd qw(abs_path); use File::Basename; +use File::Spec; BEGIN { - # Untaint the abs_path. - my ($a) = abs_path($0) =~ /^(.*)$/; - chdir dirname($a); + require lib; + my $dir = File::Spec->rel2abs(dirname(__FILE__)); + lib->import($dir, File::Spec->catdir($dir, 'lib'), File::Spec->catdir($dir, qw(local lib perl5))); + chdir $dir or die "chdir $dir failed: $!"; } -use lib qw(. lib local/lib/perl5); use Bugzilla; use Bugzilla::JobQueue::Runner; |