Skip Menu |

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

Report information
The Basics
Id: 28873
Status: resolved
Priority: 0/
Queue: Module-Load-Conditional

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

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



Subject: [PATCH] portability fixes for tests
The patch below fixes some portability issues for these tests on VMS and Win32. --- t/01_Module_Load_Conditional.t 2007-01-25 12:22:35.000000000 -0600 +++ /home/steve/p4-bleadperl/perl/lib/Module/Load/Conditional/t/01_Module_Load_Conditional.t 2007-08-17 08:07:49.000000000 -0500 @@ -43,8 +43,25 @@ ok( $rv->{version} == $Module::Load::Conditional::VERSION, q[ Found proper version] ); + # This test is expecting the file to in UNIX format, so force + $rv->{file} = VMS::Filespec::unixify($rv->{file}) if $^O eq 'VMS'; + + # break up the specification + my @rv_path; + if ($^O eq 'VMS') { + # Use the UNIX specific method, as the VMS one currently + # converts the file spec back to VMS format. + @rv_path = File::Spec::Unix->splitpath($rv->{file}); + } else { + @rv_path = File::Spec->splitpath($rv->{file}); + } + @rv_path = ($rv_path[0], File::Spec->splitdir($rv_path[1]), $rv_path[2]); + + # First element could be blank for some system types like VMS + shift @rv_path if $rv_path[0] eq ''; + ok( $INC{'Module/Load/Conditional.pm'} eq - File::Spec::Unix->catfile(File::Spec->splitdir($rv->{file}) ), + File::Spec::Unix->catfile(@rv_path), q[ Found proper file] ); @@ -152,6 +169,7 @@ { package A::B::C::D; $A::B::C::D::VERSION = $$; $INC{'A/B/C/D.pm'} = $$.$$; + $INC{'[.A.B.C]D.pm'} = $$.$$ if $^O eq 'VMS'; } my $href = check_install( module => 'A::B::C::D', version => 0 ); @@ -164,4 +182,3 @@ ' can_load successful' ); } -
thanks, applied