develooper Front page | perl.perl5.porters | Postings from November 2008

Re: 'do' won't 'do' if '/'

Thread Previous | Thread Next
From:
Yitzchak Scott-Thoennes
Date:
November 26, 2008 21:49
Subject:
Re: 'do' won't 'do' if '/'
Message ID:
59933.97.113.115.161.1227764981.squirrel@webmail.efn.org
On Wed, November 26, 2008 3:48 pm, NormW wrote:
> If, however, $file is '../lib/unicore/To/Lower.pl' (due to the NW.pm
> tweak), then the 'do' seems to fail and nothing is returned to the $simple
> var.
>
> Can anyone please advise if this is a bug (i.e 'do' being '\' dependant)
> or where in the code I might start looking for a way to overcome what may
> be a NetWare quirk?

This seems to be a bona fide bug.  do normally searches the path, but
instead just uses the filename literally when it is an absolute path
(starts with / or matches certain platform dependent patterns - for
netware: begins with x: or xxx: or \\) or is prefixed by ./ or ../.

So your filename beginning with ..\ was looked for anywhere in @INC,
but when it began ../ it wasn't.

I think the PERL_FILENAME_IS_ABSOLUTE macro should be supplemented
by a PERL_FILENAME_IS_EXPLICITLY_RELATIVE (or something to that effect).



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About