From: Eric Wong Date: Thu, 10 Apr 2014 07:26:08 +0000 (+0000) Subject: cleanup globbing X-Git-Tag: v0.0.0~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8444ebe0af96089c130be144a718378dff6f9dd9;p=ssoma-mda.git cleanup globbing Calling the glob function explicitly seems to be favored nowadays. --- diff --git a/ssoma b/ssoma index dfc7332..c575e3d 100755 --- a/ssoma +++ b/ssoma @@ -176,7 +176,7 @@ sub cmd_add { sub foreach_list { my ($sub) = @_; - foreach my $dir (<$ENV{SSOMA_HOME}/*.git>) { + foreach my $dir (glob("$ENV{SSOMA_HOME}/*.git")) { -d $dir or next; $sub->($dir); } diff --git a/t/extractor.t b/t/extractor.t index c517d73..abad5b8 100644 --- a/t/extractor.t +++ b/t/extractor.t @@ -54,7 +54,7 @@ my $check_last = sub { { $ex->extract("mydir"); - my @new = <$outdir/maildir/new/*>; + my @new = glob("$outdir/maildir/new/*"); is(scalar @new, 1, "one file now exists in maildir"); my $f = $new[0]; open my $fh, '<', $f or die "opening $f failed: $!\n"; @@ -103,7 +103,7 @@ $mda->deliver($another); { $ex->extract("mydir"); - my @new = <$outdir/maildir/new/*>; + my @new = glob("$outdir/maildir/new/*"); is(scalar @new, 1, "one new file now exists in maildir"); my $f = $new[0]; open my $fh, '<', $f or die "opening $f failed: $!\n"; @@ -153,7 +153,7 @@ $mda->deliver($conflict); { $ex->extract("mydir"); - my @new = <$outdir/maildir/new/*>; + my @new = glob("$outdir/maildir/new/*"); is(scalar @new, 1, "one new file now exists in maildir"); my $f = $new[0]; open my $fh, '<', $f or die "opening $f failed: $!\n";