On 03 Oct 2007, at 07:48, John E. Malmberg wrote:
I have not worked out a fix yet, but it seems that the last test that is failing on VMS is because ODS-2 does not retain the case of filenames that are created.

The problem is the filename is being converted to a module name and then looked up in the %$modtree hash.

Thanks for this diagnosis.. in this case, the fix is actually simple:

Instead of doing the lookup straight in the module tree, we search for a pattern with qr/$mod/i and it will find it that way -- this means it needs to spend a few
more CPU cycles getting the right answer, but the patch becomes easy:

--- lib/CPANPLUS/Internals/Search.pm    (revision 2250)
+++ lib/CPANPLUS/Internals/Search.pm    (local)
@@ -295,7 +295,18 @@
                     $mod = join '::', File::Spec->splitdir($mod);

                     return if $seen{$mod}++;
-                    my $modobj = $self->module_tree($mod) or return;
+                    my ($modobj) = do {
+                        ON_VMS
+                            ? $self->search(
+                                    type    => 'module',
+                                    allow   => [qr/^$mod$/i],
+                                )
+                            : $self->module_tree($mod)
+                    };
+
+ ### seperate return, a list context return with one ''
+                    ### in it, is also true!
+                    return unless $modobj;

                     push @rv, $modobj;
                 },

I've applied this patch to the development version of CPANPLUS.

--
  Jos Boumans

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




Reply via email to