summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-04-04 12:20:26 -0400
committerJoey Hess <joey@gnu.kitenet.net>2010-04-04 12:20:26 -0400
commit2a15f9415979e809ef332bdcffa83ff168d5bbef (patch)
treee3a03e9c7c2d9f868ae92f3c31d207fed3d6a054 /IkiWiki
parent992c2c6bca9a8ada45b043c6418b00d295012324 (diff)
rename hash and avoid unnecessary hash ref
Variable renamed to be a bit more self-explanatory. Probably more idiomatic perl to not use a hash ref when a hash can be used.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/bzr.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm
index 6e45c39e4..7eb5cfe93 100644
--- a/IkiWiki/Plugin/bzr.pm
+++ b/IkiWiki/Plugin/bzr.pm
@@ -73,26 +73,26 @@ sub bzr_log ($) {
my @infos = ();
my $key = undef;
- my $hash = {};
+ my %info;
while (<$out>) {
my $line = $_;
my ($value);
if ($line =~ /^message:/) {
$key = "message";
- $$hash{$key} = "";
+ $info{$key} = "";
}
elsif ($line =~ /^(modified|added|renamed|renamed and modified|removed):/) {
$key = "files";
- unless (defined($$hash{$key})) { $$hash{$key} = ""; }
+ unless (defined($info{$key})) { $info{$key} = ""; }
}
elsif (defined($key) and $line =~ /^ (.*)/) {
- $$hash{$key} .= "$1\n";
+ $info{$key} .= "$1\n";
}
elsif ($line eq "------------------------------------------------------------\n") {
- if (keys %$hash) {
- push (@infos, $hash);
+ if (keys %info) {
+ push (@infos, {%info});
}
- $hash = {};
+ %info = ();
$key = undef;
}
elsif ($line =~ /: /) {
@@ -104,7 +104,7 @@ sub bzr_log ($) {
else {
($key, $value) = split /: +/, $line, 2;
}
- $$hash{$key} = $value;
+ $info{$key} = $value;
}
}
close $out;