From: Craig A. Berry Date: Sat, 5 May 2007 23:42:42 +0000 (+0000) Subject: Some filename dot and extension help for Module::Build on VMS. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d9103e671ae40b2b826ec086d452403e82639f4c;p=p5sagit%2Fp5-mst-13.2.git Some filename dot and extension help for Module::Build on VMS. p4raw-id: //depot/perl@31156 --- diff --git a/lib/Module/Build/Base.pm b/lib/Module/Build/Base.pm index 305ab58..7e9b503 100644 --- a/lib/Module/Build/Base.pm +++ b/lib/Module/Build/Base.pm @@ -447,10 +447,7 @@ sub find_perl_interpreter { my $exe = $c->get('exe_ext'); foreach my $thisperl ( @potential_perls ) { - if ($proto->os_type eq 'VMS') { - # VMS might have a file version at the end - $thisperl .= $exe unless $thisperl =~ m/$exe(;\d+)?$/i; - } elsif (defined $exe) { + if (defined $exe and $proto->os_type ne 'VMS') { $thisperl .= $exe unless $thisperl =~ m/$exe$/i; } diff --git a/lib/Module/Build/Platform/VMS.pm b/lib/Module/Build/Platform/VMS.pm index 7a2b7c5..1d512c8 100644 --- a/lib/Module/Build/Platform/VMS.pm +++ b/lib/Module/Build/Platform/VMS.pm @@ -197,12 +197,30 @@ sub _infer_xs_spec { # Need to create with the same name as DynaLoader will load with. if (defined &DynaLoader::mod2fname) { my $file = DynaLoader::mod2fname([$$spec{base_name}]); - $$spec{lib_file} = File::Spec->catfile($$spec{archdir}, "$file.$self->{config}->{dlext}"); + $file .= '.' . $self->{config}->get('dlext'); + $$spec{lib_file} = File::Spec->catfile($$spec{archdir}, $file); } return $spec; } +=item rscan_dir + +Inherit the standard version but remove dots at end of name. This may not be +necessary if File::Find has been fixed or DECC$FILENAME_UNIX_REPORT is in effect. + +=cut + +sub rscan_dir { + my ($self, $dir, $pattern) = @_; + + my $result = $self->SUPER::rscan_dir( $dir, $pattern ); + + for my $file (@$result) { $file =~ s/\.$//; } + return $result; +} + + =back =head1 AUTHOR