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

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

Thread Previous | Thread Next
Yitzchak Scott-Thoennes
November 26, 2008 21:49
Re: 'do' won't 'do' if '/'
Message ID:
On Wed, November 26, 2008 3:48 pm, NormW wrote:
> If, however, $file is '../lib/unicore/To/' (due to the
> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About