Author: kwilliams
Date: Sat Sep 29 18:48:50 2007
New Revision: 10025

Modified:
   Module-Build/trunk/Changes
   Module-Build/trunk/lib/Module/Build/Platform/VMS.pm

Log:
VMS patches from blead

Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes  (original)
+++ Module-Build/trunk/Changes  Sat Sep 29 18:48:50 2007
@@ -1,8 +1,9 @@
 Revision history for Perl extension Module::Build.
 
  - Some large VMS fixes, mostly having to do with the non-case-
-   preserving nature of most VMS filesystems. [John E. Malmberg and
-   Craig A. Berry]
+   preserving nature of most VMS filesystems, but also correcting for
+   illegal characters in VMS file specs. [John E. Malmberg and Craig
+   A. Berry]
 
  - We now use a much more reliable method when Data::Dumper-ing saved
    state data to the _build/ directory. [Yves]

Modified: Module-Build/trunk/lib/Module/Build/Platform/VMS.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Platform/VMS.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Platform/VMS.pm Sat Sep 29 18:48:50 2007
@@ -195,8 +195,9 @@
 
   # Need to create with the same name as DynaLoader will load with.
   if (defined &DynaLoader::mod2fname) {
-    my $file = DynaLoader::mod2fname([$$spec{base_name}]);
-    $file .= '.' . $self->{config}->get('dlext');
+    my $file = $$spec{module_name} . '.' . $self->{config}->get('dlext');
+    $file =~ tr/:/_/;
+    $file = DynaLoader::mod2fname([$file]);
     $$spec{lib_file} = File::Spec->catfile($$spec{archdir}, $file);
   }
 
@@ -219,6 +220,36 @@
   return $result;
 }
 
+=item dist_dir
+
+Inherit the standard version but replace embedded dots with underscores 
because 
+a dot is the directory delimiter on VMS.
+
+=cut
+
+sub dist_dir {
+  my $self = shift;
+
+  my $dist_dir = $self->SUPER::dist_dir;
+  $dist_dir =~ s/\./_/g;
+  return $dist_dir;
+}
+
+=item man3page_name
+
+Inherit the standard version but chop the extra manpage delimiter off the 
front if 
+there is one.  The VMS version of splitdir('[.foo]') returns '', 'foo'.
+
+=cut
+
+sub man3page_name {
+  my $self = shift;
+
+  my $mpname = $self->SUPER::man3page_name( shift );
+  my $sep = $self->manpage_separator;
+  $mpname =~ s/^$sep//;
+  return $mpname;
+}
 
 =item expand_test_dir
 
@@ -244,7 +275,9 @@
 
 =head1 AUTHOR
 
-Michael G Schwern <[EMAIL PROTECTED]>, Ken Williams <[EMAIL PROTECTED]>
+Michael G Schwern <[EMAIL PROTECTED]>
+Ken Williams <[EMAIL PROTECTED]>
+Craig A. Berry <[EMAIL PROTECTED]>
 
 =head1 SEE ALSO
 

Reply via email to