From c9af069b5947ab7fb4a52fe735ef684072868f31 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Apr 2010 12:23:12 -0400 Subject: [PATCH] more idiomatic perl --- IkiWiki/Plugin/bzr.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 2.26.2