summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-ximportxml.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/importxml.pl b/importxml.pl
index a11f116d9..4dfd421be 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -53,7 +53,10 @@ BEGIN {
$::path = $0;
$::path =~ m#(.*)/[^/]+#;
$::path = $1;
+ $::path ||= '.'; # $0 is empty at compile time. This line will
+ # have no effect on this script at runtime.
}
+
chdir $::path;
use lib ($::path);