tryname = SvPVX_const(namesv);
tryrsfp = doopen_pm(tryname, SvCUR(namesv));
if (tryrsfp) {
- if (tryname[0] == '.' && tryname[1] == '/')
- tryname += 2;
+ if (tryname[0] == '.' && tryname[1] == '/') {
+ ++tryname;
+ while (*++tryname == '/');
+ }
break;
}
else if (errno == EMFILE)
require './test.pl'
}
-plan tests => 76;
+plan tests => 78;
my $STDOUT = tempfile();
my $STDERR = tempfile();
"ok",
"");
+open F, ">", "Oooof.pm" or die "Can't write Oooof.pm: $!";
+print F "package Oooof; 1;\n";
+close F;
+END { 1 while unlink "Oooof.pm" }
+
+try({PERL5OPT => '-I. -MOooof'},
+ ['-e', 'print "ok" if $INC{"Oooof.pm"} eq "Oooof.pm"'],
+ "ok",
+ "");
+
+try({PERL5OPT => '-I./ -MOooof'},
+ ['-e', 'print "ok" if $INC{"Oooof.pm"} eq "Oooof.pm"'],
+ "ok",
+ "");
+
try({PERL5OPT => '-w -w'},
['-e', 'print $ENV{PERL5OPT}'],
'-w -w',