From 8444ebe0af96089c130be144a718378dff6f9dd9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Apr 2014 07:26:08 +0000 Subject: [PATCH] cleanup globbing Calling the glob function explicitly seems to be favored nowadays. --- ssoma | 2 +- t/extractor.t | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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"; -- 2.26.2