@@ -11,7 +11,7 @@ use 5.006;
1111
1212use strict;
1313use warnings;
14- our $VERSION = ' 7.35_03 ' ;
14+ our $VERSION = ' 7.35_06 ' ;
1515$VERSION =~ tr / _// d;
1616
1717use ExtUtils::MakeMaker::Config;
@@ -49,8 +49,10 @@ sub _unix_os2_ext {
4949 # $potential_libs
5050 # this is a rewrite of Andy Dougherty's extliblist in perl
5151
52+ require Text::ParseWords;
53+
5254 my ( @searchpath ); # from "-L/path" entries in $potential_libs
53- my ( @libpath ) = split " " , $Config {' libpth' } || ' ' ;
55+ my ( @libpath ) = Text::ParseWords::quotewords( ' \s+ ' , 0 , $Config {' libpth' } || ' ' ) ;
5456 my ( @ldloadlibs , @bsloadlibs , @extralibs , @ld_run_path , %ld_run_path_seen );
5557 my ( @libs , %libs_seen );
5658 my ( $fullname , @fullname );
@@ -63,7 +65,7 @@ sub _unix_os2_ext {
6365 $potential_libs =~ s / (^|\s )(-F)\s *(\S +)/ $1 -Wl,$2 -Wl,$3 / g ;
6466 }
6567
66- foreach my $thislib ( split ' ' , $potential_libs ) {
68+ foreach my $thislib ( Text::ParseWords::quotewords( ' \s+ ' , 0, $potential_libs ) ) {
6769 my ( $custom_name ) = ' ' ;
6870
6971 # Handle possible linker path arguments.
@@ -88,6 +90,7 @@ sub _unix_os2_ext {
8890 $thislib = $self -> catdir( $pwd , $thislib );
8991 }
9092 push ( @searchpath , $thislib );
93+ $thislib = qq{ "$thislib "} if $thislib =~ / / ; # protect spaces if there
9194 push ( @extralibs , " $ptype$thislib " );
9295 push ( @ldloadlibs , " $rtype$thislib " );
9396 next ;
0 commit comments