On 03 Sep 2007, at 21:25, John E. Malmberg wrote:
Finally, each test run for CPANPLUS is appending a path on to $ENV {PATH} AND $ENV{PERL5LIB}. As near as I can tell, it intends to clean these up, but that is not working on VMS. I have not figured out why yet. It does not take too many runs, and the PERL5LIB path gets so long that VMS arbitrarily breaks it into two elements, neither of which is a valid path on VMS.

Actually, it doesn't attempt to clean this up -- all OS's I know (and obviously, I don't know VMS ;) reset %ENV after they have exited, so there's no need to
worry about this.

I've added the following bit of code to the include file, right at the top to
make sure that %ENV gets reset to whatever it was it began with.

Hopefully, that solves the problem you're encountering on VMS.

--- t/inc/conf.pl       (revision 2238)
+++ t/inc/conf.pl       (local)
@@ -1,3 +1,12 @@
+### On VMS, the ENV is not reset after the program terminates.
+### So reset it here explicitly
+### Use a $^O comparison, as depending on module at this time
+### may cause weird errors/warnings
+{   my %old_env;
+    BEGIN { %old_env = %ENV }
+    END   { %ENV     = %old_env if $^O eq 'VMS' }
+}
+
 BEGIN {
     use FindBin;
     use File::Spec;

--
  Jos Boumans

  How do I prove I'm not crazy to people who are?




Reply via email to