зеркало из https://github.com/mozilla/pjs.git
Fix for bug 83633: perl warnings in 5.6
r= Hixie
This commit is contained in:
Родитель
53e52cbe8b
Коммит
6e938b4597
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче