Craig A. Berry wrote:
At 5:42 PM -0600 11/11/07, John E. Malmberg wrote:
VMS needs @INC to be an absolute path for the find.t and taint.t
tests to pass when it is run under the test harness.

My impression was that a failure invoked Carp, which because it uses
dynamic loading couldn't find its dependencies (notably
Carp/Heavy.pl).  Are you saying this was the cause of the failure and
not just collateral damage?

It appears that Perl is loading Carp/Heavy just in case an error might occur, and not because an error occurred.

I have put all sorts of debug statements around where the Carp/Heavy failure is showing up, and while apparently the module is loaded, there is no failure, so the warning routine is never called.

Someone who understands Perl internals better than I do may have an explanation as to why that is.

--- /rsync_root/perl/lib/File/Find/t/find.t     Mon Oct 22 22:41:49 2007
+++ lib/File/Find/t/find.t      Sun Nov 11 17:18:47 2007
@@ -12,6 +12,11 @@
BEGIN {
    chdir 't' if -d 't';
    unshift @INC => '../lib';
+    if ($^O eq 'VMS') {
+        require File::Spec;
+        @INC = File::Spec->rel2abs('[-.lib]');

Any reason not to unshift onto @INC instead of entirely replacing it?

No reason. In my tests, @INC contains ('../lib') before the first shift, and ('../lib','../lib') after the shift, so the prior values are not used.

+    }
+

    $SIG{'__WARN__'} = sub { $warn_msg = $_[0]; warn "# $_[0]"; }
}
--- /rsync_root/perl/lib/File/Find/t/taint.t    Mon Oct 22 22:41:49 2007
+++ lib/File/Find/t/taint.t     Sun Nov 11 17:20:02 2007
@@ -10,6 +10,10 @@
BEGIN {
    chdir 't' if -d 't';
    unshift @INC => '../lib';
+    if ($^O eq 'VMS') {
+        require File::Spec;
+        @INC = File::Spec->rel2abs('[-.lib]');
+    }
}

use Config;

I just discovered that t/op/taint.t is mangling PATH and DCL$PATH when it is run outside of the test harness, which breaks other things.

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to