Ken Williams wrote:
On Sep 28, 2007, at 11:42 PM, Craig A. Berry wrote:
It applied cleanly against blead, where I've checked it in as 31995.
I wonder if we've had some drift between blead and the independent
version.
Indeed we have, here are the VMS-related outstanding differences.
Could someone verify that the blead version is correct, and let me know
who to assign credit to in the Changes file?
-Ken
diff -ur /Users/ken/Downloads/perl/bleadperl/lib/Module/Build/Base.pm
lib/Module/Build/Base.pm
--- /Users/ken/Downloads/perl/bleadperl/lib/Module/Build/Base.pm
2007-09-28 23:43:35.000000000 -0500
+++ lib/Module/Build/Base.pm 2007-09-28 20:57:28.000000000 -0500
@@ -447,7 +446,10 @@
my $exe = $c->get('exe_ext');
foreach my $thisperl ( @potential_perls ) {
- if (defined $exe and $proto->os_type ne 'VMS') {
+ if ($proto->is_vmsish) {
+ # VMS might have a file version at the end
+ $thisperl .= $exe unless $thisperl =~ m/$exe(;\d+)?$/i;
+ } elsif (defined $exe) {
$thisperl .= $exe unless $thisperl =~ m/$exe$/i;
}
The the newer code "+" is correct, as there may be a file version
present, and if so, it should be preserved.
diff -ur /Users/ken/Downloads/perl/bleadperl/lib/Module/Build/
Platform/VMS.pm lib/Module/Build/Platform/VMS.pm
--- /Users/ken/Downloads/perl/bleadperl/lib/Module/Build/Platform/
VMS.pm 2007-09-28 23:43:35.000000000 -0500
+++ lib/Module/Build/Platform/VMS.pm 2007-09-28 20:51:56.000000000 -0500
@@ -195,9 +195,8 @@
# Need to create with the same name as DynaLoader will load with.
if (defined &DynaLoader::mod2fname) {
- my $file = $$spec{module_name} . '.' . $self->{config}->get ('dlext');
- $file =~ tr/:/_/;
- $file = DynaLoader::mod2fname([$file]);
+ my $file = DynaLoader::mod2fname([$$spec{base_name}]);
+ $file .= '.' . $self->{config}->get('dlext');
$$spec{lib_file} = File::Spec->catfile($$spec{archdir}, $file);
}
Apparently mod2fname on VMS for deals with conversion of the ":". This
appears to be one of Craig's fixes.
@@ -220,36 +219,6 @@
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;
-}
This is right for ODS-2 volumes, I think it will need to be fixed on
ODS-5 as dots are allowed inside of directory specifications.
If the file specification can be guaranteed to be in VMS format, then
C<.> characters that are preceded by C<^> characters should not be
translated. This will be the case for both ODS-5 and ODS-2 because the
C<^> will not be present on ODS-2.
I currently do not know how to modify the regex for that case.
If this is a UNIX format directory name on an ODS-5 volume, then no
conversion should be done. I do not know how to determine if this is
the case. Depending on the context, that may not matter.
-=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;
-}
That one was first added by Craig in:
http://public.activestate.com/cgi-bin/perlbrowse/p/31619
I could not get it to work until I broke it up to assign the
manpage_separator to a separate variable, and then put the variable in
the regex.