[svn:Module-Build] r13296 - in Module-Build/trunk: lib/Module/Build t/properties
[email protected] Tue, 8 Sep 2009 19:38:44 -0700 (PDT)
| Newsgroups | perl.module.build.checkins |
|---|---|
| Message-ID | <[email protected]> |
Author: dagolden
Date: Tue Sep 8 19:38:42 2009
New Revision: 13296
Modified:
Module-Build/trunk/lib/Module/Build/Base.pm
Module-Build/trunk/t/properties/share_dir.t
Log:
fix share_dir path tests on Windows
Modified: Module-Build/trunk/lib/Module/Build/Base.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Base.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Base.pm Tue Sep 8 19:38:42 2009
@@ -2536,14 +2536,14 @@
my @file_map;
if ( $share_dir->{dist} ) {
- my $prefix = "dist/" . $self->dist_name;
+ my $prefix = File::Spec->catdir( "dist", $self->dist_name );
push @file_map, $self->_share_dir_map( $prefix, $share_dir->{dist} );
}
if ( $share_dir->{module} ) {
for my $mod ( keys %{ $share_dir->{module} } ) {
(my $altmod = $mod) =~ s{::}{-}g;
- my $prefix = "module/$altmod";
+ my $prefix = File::Spec->catdir("module", $altmod);
push @file_map, $self->_share_dir_map($prefix, $share_dir->{module}{$mod});
}
}
@@ -2556,7 +2556,7 @@
my %files;
for my $dir ( @$list ) {
for my $f ( @{ $self->rscan_dir( $dir, sub {-f} )} ) {
- $files{$f} = File::Spec->catfile(
+ $files{File::Spec->canonpath($f)} = File::Spec->catfile(
$prefix, File::Spec->abs2rel( $f, $dir )
);
}
Modified: Module-Build/trunk/t/properties/share_dir.t
==============================================================================
--- Module-Build/trunk/t/properties/share_dir.t (original)
+++ Module-Build/trunk/t/properties/share_dir.t Tue Sep 8 19:38:42 2009
@@ -161,8 +161,8 @@
is_deeply( $mb->_find_share_dir_files,
{
- 'share/foo.txt' => 'dist/Simple-Share/foo.txt',
- 'other/share/bar.txt' => 'module/Simple-Share/bar.txt',
+ catfile(qw/share foo.txt/) => catfile(qw/dist Simple-Share foo.txt/),
+ catfile(qw/other share bar.txt/) => catfile(qw/module Simple-Share bar.txt/),
},
"share_dir filemap for copying to lib complete"
);