This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perlfunc: re-document old split() @_ side effect
[perl5.git]
/
lib
/
FindBin.t
diff --git
a/lib/FindBin.t
b/lib/FindBin.t
old mode 100755
(executable)
new mode 100644
(file)
index
d07ce75
..
36e142c
--- a/
lib/FindBin.t
+++ b/
lib/FindBin.t
@@
-1,15
+1,20
@@
#!./perl
BEGIN {
#!./perl
BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
+ # Can't chdir in BEGIN before FindBin runs, as it then can't find us.
+ @INC =
-d 't' ? 'lib' :
'../lib';
}
}
-print "1..
1
\n";
+print "1..
2
\n";
use FindBin qw($Bin);
print "# $Bin\n";
use FindBin qw($Bin);
print "# $Bin\n";
-
print "not " unless $Bin =~ m,[/.]lib\]?$,;
print "ok 1\n";
print "not " unless $Bin =~ m,[/.]lib\]?$,;
print "ok 1\n";
+
+$0 = "-";
+FindBin::again();
+
+print "not " if $FindBin::Script ne "-";
+print "ok 2\n";