Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 55288
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: cberry [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.36
Fixed in: (no value)



Subject: [PATCH] VMS update for compat.t, share_dir.t
Download (untitled) / with headers
text/plain 872b
Attached is a patch against blead that also applies cleanly and gets all tests passing with 0.3603. - There were some small but serious bugs in Module::Build::Platform::VMS::_prefixify including a reference to a non-existent private function. - In compat.t, there was some VMS-specific passthrough handling that's no longer needed since that's been deprecated. - In compat.t, appending directory names together needs to be done such that dev:[dir] with mydir added ends up as dev:[dir.mydir] rather than dev:[dir]mydir]. The code works correctly but the test expectations were wrong. - In properties/share_dir.t, is_deeply is being used to do case sensitive comparisons of filenames. On VMS you can't rely on filename case being preserved. Since there is no like_deeply in Test::More to do a case insensitive match, I've just skipped those tests for now.
Subject: mbvms.patch
Download mbvms.patch
text/x-diff 4k
--- lib/Module/Build/Platform/VMS.pm;-0 2010-01-19 20:44:11 -0600 +++ lib/Module/Build/Platform/VMS.pm 2010-03-05 12:42:06 -0600 @@ -77,10 +77,29 @@ Prefixify taking into account VMS' filep =cut # Translated from ExtUtils::MM_VMS::prefixify() + +sub _catprefix { + my($self, $rprefix, $default) = @_; + + my($rvol, $rdirs) = File::Spec->splitpath($rprefix); + if( $rvol ) { + return File::Spec->catpath($rvol, + File::Spec->catdir($rdirs, $default), + '' + ) + } + else { + return File::Spec->catdir($rdirs, $default); + } +} + + sub _prefixify { my($self, $path, $sprefix, $type) = @_; my $rprefix = $self->prefix; + return '' unless defined $path; + $self->log_verbose(" prefixify $path from $sprefix to $rprefix\n"); # Translate $(PERLPREFIX) to a real path. @@ -90,7 +109,7 @@ sub _prefixify { $self->log_verbose(" rprefix translated to $rprefix\n". " sprefix translated to $sprefix\n"); - if( length $path == 0 ) { + if( length($path) == 0 ) { $self->log_verbose(" no path to prefixify.\n") } elsif( !File::Spec->file_name_is_absolute($path) ) { --- t/compat.t;-0 2010-01-19 20:44:11 -0600 +++ t/compat.t 2010-03-06 11:34:46 -0600 @@ -218,23 +218,25 @@ ok $mb, "Module::Build->new_from_context (my $libdir2 = $libdir) =~ s/libdir/lbiidr/; my $libarch2 = File::Spec->catdir($libdir2, 'arch'); + my $check_base = $libdir2; + $check_base =~ s/\]\z// if $^O eq 'VMS'; # trim trailing ] for appending other dirs SKIP: { my @cases = ( { label => "INSTALLDIRS=vendor", args => [ 'INSTALLDIRS=vendor', "INSTALLVENDORLIB=$libdir2", "INSTALLVENDORARCH=$libarch2"], - check => qr/\Q$libdir2\E .* Simple\.pm/ix, + check => qr/\Q$check_base\E .* Simple\.pm/ix, }, { label => "PREFIX=\$libdir2", args => [ "PREFIX=$libdir2"], - check => qr/\Q$libdir2\E .* Simple\.pm/ix, + check => qr/\Q$check_base\E .* Simple\.pm/ix, }, { label => "PREFIX=\$libdir2 LIB=mylib", args => [ "PREFIX=$libdir2", "LIB=mylib" ], - check => qr{\Q$libdir2\E[/\\]mylib[/\\]Simple\.pm}ix, + check => qr{\Q$check_base\E[/\\\.]mylib[/\\\]]Simple\.pm}ix, }, ); @@ -244,10 +246,6 @@ ok $mb, "Module::Build->new_from_context for my $c (@cases) { my @make_args = @{$c->{args}}; - if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax. - $make_args[0] = '/macro=("' . join('","',@make_args) . '")'; - pop @make_args while scalar(@make_args) > 1; - } ($output) = stdout_stderr_of( sub { $result = $mb->run_perl_script('Makefile.PL', [], \@make_args); --- t/properties/share_dir.t;-0 2009-12-17 16:17:10 -0600 +++ t/properties/share_dir.t 2010-03-06 12:10:11 -0600 @@ -179,6 +179,11 @@ ok( -d 'blib/lib/auto/share', "blib/lib/ my $share_list = Module::Build->rscan_dir('blib/lib/auto/share', sub {-f}); +SKIP: +{ + +skip 'filename case not necessarily preserved', 1 if $^O eq 'VMS'; + is_deeply( [ sort @$share_list ], [ 'blib/lib/auto/share/dist/Simple-Share/foo.txt', @@ -187,6 +192,8 @@ is_deeply( "share_dir files copied to blib" ); +} + #--------------------------------------------------------------------------# # test installing #--------------------------------------------------------------------------# @@ -202,6 +209,11 @@ $share_list = Module::Build->rscan_dir( "$temp_install/lib/perl5/auto/share", sub {-f} ); +SKIP: +{ + +skip 'filename case not necessarily preserved', 1 if $^O eq 'VMS'; + is_deeply( [ sort @$share_list ], [ "$temp_install/lib/perl5/auto/share/dist/Simple-Share/foo.txt", @@ -210,6 +222,8 @@ is_deeply( "share_dir files correctly installed" ); +} + #--------------------------------------------------------------------------# # test with File::ShareDir #--------------------------------------------------------------------------#
Download (untitled) / with headers
text/plain 129b
Thank you. Patch applied to the repository. Given the Perl code freeze, I don't plan to update M::B in blead until 5.13 begins.
Download (untitled) / with headers
text/plain 103b
Now that there has been a stable Module::Build release, I'm marking this "patched" issue as "resolved".


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.