Skip Menu |

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 68926
Status: resolved
Priority: 0/
Queue: IO-Compress

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

Bug Information
Severity: Important
Broken in: 2.035
Fixed in: 2.037



Subject: [PATCH] get globmapper tests working on VMS
The tests and test infrastructure for the new globmapper feature have expectations about Unix filename syntax rather deeply embedded in them, but on VMS, File::Temp returns directory names in native syntax, which leads to a slew of test failures. The least intrusive thing to do seems to be to convert temp directory names to Unix syntax at their source in the LexDir package in CompTestUtils.pm on VMS only. The attached patch does that and gets all tests passing again.
Subject: vms_ioc_unixify.patch
--- t/compress/CompTestUtils.pm;-0 2011-06-09 06:18:36 -0500 +++ t/compress/CompTestUtils.pm 2011-06-18 16:53:47 -0500 @@ -83,6 +83,12 @@ BEGIN { { Carp::croak "NO!!!!" if defined $_; $_ = File::Temp->newdir(DIR => '.'); + # Subsequent manipulations assume Unix syntax, metacharacters, etc. + if ($^O eq 'VMS') + { + $_->{DIRNAME} = VMS::Filespec::unixify($_->{DIRNAME}); + $_->{DIRNAME} =~ s/\/$//; + } } bless [ @_ ], $self ; } @@ -92,6 +98,12 @@ BEGIN { { Carp::croak "NO!!!!" if defined $_; $_ = File::Temp::tempdir(DIR => '.', CLEANUP => 1); + # Subsequent manipulations assume Unix syntax, metacharacters, etc. + if ($^O eq 'VMS') + { + $_ = VMS::Filespec::unixify($_); + $_ =~ s/\/$//; + } } bless [ @_ ], $self ; }
Thanks, applied.
Uploaded 2.037 with your patch to CPAN. I'll close this ticket. Please ping me if that hasn't sorted the issue. Paul