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.

> >
>> 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.

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.



-- 
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to