diff --git a/lib/Alien/Base.pm b/lib/Alien/Base.pm index f09ec094..b6e60b68 100644 --- a/lib/Alien/Base.pm +++ b/lib/Alien/Base.pm @@ -55,7 +55,7 @@ sub import { push @DynaLoader::dl_resolve_using, @libpaths; - my @librefs = map { DynaLoader::dl_load_file( $_, 0x01 ) } @libpaths; + my @librefs = map { DynaLoader::dl_load_file( $_, 0x01 ) } grep !/\.(a|lib)$/, @libpaths; push @DynaLoader::dl_librefs, @librefs; } diff --git a/lib/Alien/Base/ModuleBuild.pm b/lib/Alien/Base/ModuleBuild.pm index 5960502e..ff899a44 100644 --- a/lib/Alien/Base/ModuleBuild.pm +++ b/lib/Alien/Base/ModuleBuild.pm @@ -462,6 +462,7 @@ sub alien_library_destination { my $dist_name = $self->dist_name; my $dest = File::Spec->catdir( $lib_dir, qw/auto share dist/, $dist_name ); + $dest =~ s{\\}{/}g if $^O eq 'MSWin32'; return $dest; } diff --git a/t/install_destination.t b/t/install_destination.t index 8c0e210d..3cdf4b35 100644 --- a/t/install_destination.t +++ b/t/install_destination.t @@ -22,6 +22,7 @@ my $path = $builder->alien_library_destination; # this is not good enough, I really wish I could introspect File::ShareDir, then again, I wouldn't need this test! my $path_to_share = File::Spec->catdir( qw/auto share dist My-Test/ ); +$path_to_share =~ s{\\}{/}g if $^O eq 'MSWin32'; like $path, qr/\Q$path_to_share\E/, 'path looks good';