Skip to content

Commit

Permalink
Replace glob as fails if space in dir name
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Dec 24, 2014
1 parent 256e470 commit e247419
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/27inline_maker.t
Expand Up @@ -19,7 +19,6 @@ my ($example_modules_dir) = grep { -e } map {
} qw(eg example);

plan skip_all => "No 'example' or 'eg' directory." unless $example_modules_dir;
plan skip_all => "Not yet ported to MS Windows" if $^O =~ /MSWin32/i;
require Inline;
plan skip_all => "Inline version 0.64+ required for this."
unless version->parse($Inline::VERSION) >= version->parse(0.64);
Expand All @@ -32,7 +31,7 @@ mkpath $inst_dir;

my $cwd = getcwd;
# loop the list of modules and try to build them.
for my $module (glob "$example_modules_dir/*") {
for my $module (lsdir($example_modules_dir)) {
rcopy $module, $src_dir or die "rcopy $module $src_dir: $!\n";
chdir $src_dir;
my $buffer = '';
Expand All @@ -45,6 +44,13 @@ for my $module (glob "$example_modules_dir/*") {
rmtree $src_dir if $CLEANUP;
}

sub lsdir {
my $dir = shift;
local *DIR;
opendir DIR, $dir or die "$dir: $!";
map File::Spec->catdir($dir, $_), grep !/^\./, readdir DIR;
}

sub do_make {
my $target = shift;
my $buffer = '';
Expand Down

0 comments on commit e247419

Please sign in to comment.