aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-04-04 12:23:12 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-04-04 12:23:12 -0400
commitc9af069b5947ab7fb4a52fe735ef684072868f31 (patch)
treea68808e9283605cdfd8626a6af8bf074627f1687 /IkiWiki
parent2a15f9415979e809ef332bdcffa83ff168d5bbef (diff)
downloadikiwiki-c9af069b5947ab7fb4a52fe735ef684072868f31.tar
ikiwiki-c9af069b5947ab7fb4a52fe735ef684072868f31.tar.gz
more idiomatic perl
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/bzr.pm6
1 files 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;
}