From 603852acc27bc8245ad62ecd366545f2aa91930b Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" Date: Fri, 1 Jun 2001 10:03:52 +0000 Subject: [PATCH] Fix for bug 83633: perl warnings in 5.6 r= Hixie git-svn-id: svn://10.0.0.236/trunk@96174 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/importxml.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mozilla/webtools/bugzilla/importxml.pl b/mozilla/webtools/bugzilla/importxml.pl index b4b27b1e0bd..730c5a39c03 100755 --- a/mozilla/webtools/bugzilla/importxml.pl +++ b/mozilla/webtools/bugzilla/importxml.pl @@ -46,10 +46,15 @@ use strict; # figure out which path this script lives in. Set the current path to # this and add it to @INC so this will work when run as part of mail # alias by the mailer daemon -my $path = $0; -$path =~ s#(.*)/[^/]+#$1#; -chdir $path; -use lib ($path); +# since "use lib" is run at compile time, we need to enclose the +# $::path declaration in a BEGIN block so that it is executed before +# the rest of the file is compiled. +BEGIN { + $::path = $0; + $::path =~ s#(.*)/[^/]+#$1#; +} +chdir $::path; +use lib ($::path); use XML::Parser; use Data::Dumper;