in reply to do'.\dir\file' under -T on Windows
Shouldn't perl -T -e"do'./t\t.pl'" and perl -T -e"do'.\t\t.pl'" do the same thing
Yes. "/" and "\" are equivalent in Windows paths.
I can replicate the problem with ActivePerl 5.6.0, 5.6.1, 5.8.0, 5.8.8, 5.10.0.
Seems the logic for whether @INC should be used or not is broken. Under -T, @INC doesn't contain ".", and do'.\t\t.pl' is using @INC instead of the cd.
(and print 'hi').
Seems so. 5.8.8 on linux:
$ perl -le'@INC=(); do "t/t.pl"' $ perl -le'@INC=(); do "./t/t.pl"' hi $ perl -T -le'@INC=(); do "t/t.pl"' $ perl -T -le'@INC=(); do "./t/t.pl"' hi
Update: Added comparison to linux and explanation of problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: do'.\dir\file' under -T on Windows
by Bloodnok (Vicar) on Feb 25, 2009 at 16:19 UTC | |
by ikegami (Patriarch) on Feb 25, 2009 at 17:01 UTC | |
by Anonymous Monk on Feb 26, 2009 at 07:58 UTC | |
by lamprecht (Friar) on Feb 26, 2009 at 08:03 UTC | |
by ikegami (Patriarch) on Feb 25, 2009 at 16:30 UTC |