Craig A. Berry wrote:
At 11:13 AM +0100 11/3/07, Rafael Garcia-Suarez wrote:
On 03/11/2007, John E. Malmberg <[EMAIL PROTECTED]> wrote:
Some of the tests are trying to dynamically load modules on VMS.
In the one case I'm aware of (File::Find) it is the module itself
rather than the test for it that uses dynamic loading, or, rather,
uses a module -- Carp -- that itself uses dynamic loading.
It seems to be currently affecting:
ext/Devel/Peek/t/Peek.t
lib/File/Find/t/find.t
lib/File/Find/t/taint.t
lib/I18N/LangTags/t/80_all_env.t
The TestInit.pm overrides @INC with a path that only works if the test
does not change the default directory on VMS.
This patch sets @INC to an absolute path so that changes of directories
do not break dynamically loaded modules.
I've applied a less invasive version of this patch, see below.
However, putting such a dependency on File::Spec is a bit disturbing,
even if limited only to VMS. Wouldn't it be better to fix the tests
instead ? (post-5.10 maybe)
I don't particularly like it either, and I don't think it's a
VMS-specific issue, but I'm not sure what else to suggest. The
deadly combination is changing directories at run-time, having
everything in @INC a relative path (such as when testing an
uninstalled perl with t/TEST), and invoking a module that uses
dynamic loading. When File::Find attempts to carp about something
while running its tests, the only user-visible problem is:
Can't locate Carp/Heavy.pm in @INC (@INC contains: ../lib ../lib) at
../lib/warnings.pm line 450.
The other thing is that these tests are not reporting any warnings or
errors if Carp/Heavy.pm is actually loaded.
It looks like for some reason it is loading Carp/Heavy.pm or some other
module just in case it may be needed, possibly as part of an optimization.
I put debug print statements all through the Find.pm code where it was
tripping the above warning, and it never took a code path that printed
that the status of the chdir() succeeded or failed.
As far as I can tell, the only way in which this is a VMS problem is
that we're the only ones triggering a warning. Perhaps for now we
should have the File::Find tests put an absolute path in @INC and
leave TestInit alone, though there are other modules, such as
File::Path, that chdir all over the place and also use Carp.
-John
[EMAIL PROTECTED]