Skip to content

Commit

Permalink
Miscellaneous VMS updates.
Browse files Browse the repository at this point in the history
In print_build_script, don't canonicalize paths on VMS.  @inc is
stored in Unix -- not native -- format, and calling canonpath
doesn't preserve that.

In _find_pods, localize the file path so that we match the
localization already being done for the directory the file is in.

In ACTION_disttest and ACTION_distinstall, run $self->build_script
rather than a hard-coded, Unix-only, 'Build'.

In t/install.t, don't universally lower-case a filename that will
now be case-preserved on VMS.
  • Loading branch information
craigberry committed Mar 27, 2013
1 parent fd6c8e0 commit 9e9f024
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
15 changes: 8 additions & 7 deletions lib/Module/Build/Base.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ sub print_build_script {

my @myINC = $self->_added_to_INC;
for (@myINC, values %q) {
$_ = File::Spec->canonpath( $_ );
$_ = File::Spec->canonpath( $_ ) unless $self->is_vmsish;
s/([\\\'])/\\$1/g;
}

Expand Down Expand Up @@ -3302,6 +3302,7 @@ sub _find_pods {
foreach my $regexp ( @{ $args{exclude} } ) {
next FILE if $file =~ $regexp;
}
$file = $self->localize_file_path($file);
$files{$file} = File::Spec->abs2rel($file, $dir) if $self->contains_pod( $file )
}
}
Expand Down Expand Up @@ -4095,9 +4096,9 @@ sub ACTION_disttest {

$self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile
or die "Error executing 'Build.PL' in dist directory: $!";
$self->run_perl_script('Build')
or die "Error executing 'Build' in dist directory: $!";
$self->run_perl_script('Build', [], ['test'])
$self->run_perl_script($self->build_script)
or die "Error executing $self->build_script in dist directory: $!";
$self->run_perl_script($self->build_script, [], ['test'])
or die "Error executing 'Build test' in dist directory";
});
}
Expand All @@ -4111,9 +4112,9 @@ sub ACTION_distinstall {
sub {
$self->run_perl_script('Build.PL')
or die "Error executing 'Build.PL' in dist directory: $!";
$self->run_perl_script('Build')
or die "Error executing 'Build' in dist directory: $!";
$self->run_perl_script('Build', [], ['install'])
$self->run_perl_script($self->build_script)
or die "Error executing $self->build_script in dist directory: $!";
$self->run_perl_script($self->build_script, [], ['install'])
or die "Error executing 'Build install' in dist directory";
}
);
Expand Down
8 changes: 0 additions & 8 deletions t/install.t
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ Simple Man <simple@example.com>
is keys %$pods, 1;
my $expect = $mb->localize_file_path('lib/Simple/Docs.pod');

# TODO:
# True for traditional VMS, but will need to be changed when ODS-5 support
# for case preserved filenames is active.
# The issue is that the keys to the $pods hash are currently being set to
# lowercase on VMS so can not be found in exact case.

$expect = lc($expect) if $^O eq 'VMS';

is $pods->{$expect}, $expect;

my $pms = $mb->_find_file_by_type('awefawef', 'lib');
Expand Down

0 comments on commit 9e9f024

Please sign in to comment.