]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
more idiomatic use of foreach
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 12 Aug 2009 16:49:40 +0000 (12:49 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 12 Aug 2009 16:49:40 +0000 (12:49 -0400)
IkiWiki/Plugin/darcs.pm

index 9b62e70e49e062fbcccfb5312e54157fcc5a1385..2448673ac49169024aea08b0e8305d8a8622d414 100644 (file)
@@ -318,9 +318,9 @@ sub rcs_recentchanges ($) {
                my $hash=$patch->{hash};
                my $when=str2time($date);
                my (@pages, @files, @pg);
-               push @pages, $_ for (@{$patch->{summary}->[0]->{modify_file}});
-               push @pages, $_ for (@{$patch->{summary}->[0]->{add_file}});
-               push @pages, $_ for (@{$patch->{summary}->[0]->{remove_file}});
+               push @pages, $_ foreach (@{$patch->{summary}->[0]->{modify_file}});
+               push @pages, $_ foreach (@{$patch->{summary}->[0]->{add_file}});
+               push @pages, $_ foreach (@{$patch->{summary}->[0]->{remove_file}});
                foreach my $f (@pages) {
                        $f = $f->{content} if ref $f;
                        $f =~ s,^\s+,,; $f =~ s,\s+$,,; # cut whitespace