From: Joey Hess Date: Sun, 4 Apr 2010 16:23:12 +0000 (-0400) Subject: more idiomatic perl X-Git-Tag: 3.20100427~240 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c9af069b5947ab7fb4a52fe735ef684072868f31;p=ikiwiki.git more idiomatic perl --- diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 7eb5cfe93..c96f2d695 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -83,15 +83,13 @@ sub bzr_log ($) { } elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) { $key = "files"; - unless (defined($info{$key})) { $info{$key} = ""; } + $info{$key} = "" unless defined $info{$key}; } elsif (defined($key) and $line =~ /^ (.*)/) { $info{$key} .= "$1\n"; } elsif ($line eq "------------------------------------------------------------\n") { - if (keys %info) { - push (@infos, {%info}); - } + push @infos, {%info} if keys %info; %info = (); $key = undef; }