[Module-build-checkins] Module-Build/t/lib DistGen.pm,1.17,1.18
Status: Beta
Brought to you by:
kwilliams
From: Ken W. <kwi...@us...> - 2006-03-24 23:26:50
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27541/t/lib Modified Files: DistGen.pm Log Message: Fix some VMS quoting issues and add _backticks() and _quote_args() methods Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- DistGen.pm 25 Feb 2006 15:27:27 -0000 1.17 +++ DistGen.pm 24 Mar 2006 23:26:44 -0000 1.18 @@ -16,6 +16,14 @@ use IO::File (); use Tie::CPHash; +BEGIN { + if( $^O eq 'VMS' ) { + # For things like vmsify() + require VMS::Filespec; + VMS::Filespec->import; + } +} + sub new { my $package = shift; my %options = @_; @@ -309,7 +317,11 @@ File::Find::finddepth( sub { my $name = File::Spec->canonpath( $File::Find::name ); - $name =~ s/\.\z// if $^O eq 'VMS'; + if ($^O eq 'VMS') { + $name =~ s/\.\z//; + $name = vmspath($name) if -d $name; + $name = File::Spec->rel2abs($name) if $name eq File::Spec->curdir(); + } if ( not exists $names{$name} ) { print "Removing '$name'\n" if $VERBOSE; @@ -322,7 +334,7 @@ sub remove { my $self = shift; - File::Path::rmtree( $self->dirname ); + File::Path::rmtree( File::Spec->canonpath($self->dirname) ); } sub revert { |