Craig Berry wrote in a reply to me:
> I don't think it's a new problem; I think we just didn't run into it very
often until recently.
Having spent some time yesterday
poring over the diff between Find.pm
as shipped with perl 5.8.0 (little difference)
as well as with perl 5.6.1 (big differences
due to support added for Mac OS) I was
beginning to reach the same unfortunate
conclusion. I guess before we just did not
have regression tests that had attempted to
find() their way into a psuedo PERL_ROOT
hence they had not encountered the SITE_PERL
logical name before (which is the source of
my failure - note that we could add a check for
the SITE_PERL logical name in a call to
Bad_environment in configure.com).
You then went on to add:
> Yes, same thing happens here. I think whenever File::Find does C<chdir
$foo;> we need to make it > do C<chdir "./$foo";> or, more portably,
C<chdir File::Spec->catdir(File::Spec->curdir, $foo);>. > Every time I
start to do this I get confused because there are some paths that may be
expected to > be absolute when passed to chdir, but there aren't exactly a
lot of comments in the File::Find > code to help me figure out what's going
on.
I suspect that there are two considerations
to keep in mind: 1) the stumbling over logical
names that point to directories is likely to
be a problem primarily on VMS. Recall that on
Unix you'd have to pull an environment variable
out of %ENV in order to make it look like a
directory name, whereas on VMS the logical name
itself can return a "false positive" to C<-d> and
C<chdir()> calls. 2) the Mac_OS stuff was added in a
way that interfered rather little with the rest
of Find.pm, but had to do so in order to address
the unique file specification syntax of that platform.
I'd further suspect that using the portable
C<chdir File::Spec->catdir(File::Spec->curdir, $foo);>
would slow things down on Unix and make the use
of perl's File::Find module less than desirable,
especially compared to the native find program.
All of which serves as an argument for
following the C<if ($Is_VMS) { chdir "./$foo"; }
else { chdir $foo; }> path internal to Find.pm.
If we came up with two alternatives we could benchmark
them to compare speed.
By the way I can empathize with the lack of comments
sentiment. Thankfully there are more comments
in [EMAIL PROTECTED] than there were in File::Find.pm as
shipped with perl 5.6.1.
Peter Prymmer