summaryrefslogtreecommitdiffstats
path: root/importxml.pl
diff options
context:
space:
mode:
authorjustdave%syndicomm.com <>2001-06-01 19:03:52 +0200
committerjustdave%syndicomm.com <>2001-06-01 19:03:52 +0200
commit6496a7165061d8552f3cc1bc3aa1454b24f45470 (patch)
tree5ec680b77ed0313ccda8f12c79c32012f2c18985 /importxml.pl
parentca200b83bb5c0a15cde04399f3364600d5ce57e1 (diff)
downloadbugzilla-6496a7165061d8552f3cc1bc3aa1454b24f45470.tar.gz
bugzilla-6496a7165061d8552f3cc1bc3aa1454b24f45470.tar.xz
Fix for bug 83633: perl warnings in 5.6
r= Hixie
Diffstat (limited to 'importxml.pl')
-rwxr-xr-ximportxml.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/importxml.pl b/importxml.pl
index b4b27b1e0..730c5a39c 100755
--- a/importxml.pl
+++ b/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;