> Cannot find current script
> '\\?\c:\inetpub\wwwroot\mydemos\examples\testscript\path.exe' at
> /PerlApp/FindBin.pm line 201
> BEGIN failed--compilation aborted at /PerlApp/FindBin.pm line 201.
> BEGIN failed--compilation aborted at path.pl line 9.
>
For some reason IIS (?) is using the unicode form of the path (i.e.
prefixing with \\?) and this causes FindBin to fail. Actually, just
putting the following in c:\tmp\foo.pl:
use FindBin;
and then trying to run with 'perl \\?\c:\tmp\foo.pl' causes the same
error (note that the script *does* run however - giving a path this way
is thus legal).
Tracing it shows that it is a 'file exist' check that fails, and indeed,
trying it specifically shows this. Assuming c:\tmp\foo.pl exists as a file:
perl -e "print -f $ARGV[0]" c:\tmp\foo.pl
will print '1', while
perl -e "print -f $ARGV[0]" \\?\c:\tmp\x.pl
will print '' (i.e. a blank value, indicating false). Still, it's
generally ok to use the \\? form (since the example above, running 'perl
\\?\c:\tmp\foo.pl' nicely runs the script).
Thus, I'd file this as a bug with the '-f' operator...?
For your particular problem - whether you can get IIS to avoid that form
I have no idea. A workaround might be this...
...
BEGIN { $0 =~ s#^\\\\\?\\## };
use FindBin;
...
Ugh...not very nice and I don't know if it might cause problems
elsewhere, or if it'll work when perlapped...
ken1
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs