]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/bzr.pm
rename hash and avoid unnecessary hash ref
[ikiwiki.git] / IkiWiki / Plugin / bzr.pm
index 6e45c39e44ccefaa37851ea6a0b604362167c437..7eb5cfe93dd9987d63634c05ae51193c97f08915 100644 (file)
@@ -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;