]> diplodocus.org Git - flac-archive/commitdiff
WTF! I just noticed that i forgot the part of hhlp that would
authorepg <>
Fri, 14 Apr 2006 18:29:15 +0000 (18:29 +0000)
committerepg <>
Fri, 14 Apr 2006 18:29:15 +0000 (18:29 +0000)
actually create the array reference, but it worked anyway!  Now i
find out perl has autovivified these since at least 2000.  Yet i'm
sure they weren't being autovivified when i had to do something
similar at Lexmark a couple years ago.  Maybe it was a bug in
whatever Perl version i was using, or more likely i was just smoking
crack...

Kill hhlp.

fa-flacd

index 69566ac..aeeff3c 100755 (executable)
--- a/fa-flacd
+++ b/fa-flacd
@@ -65,16 +65,6 @@ sub get_tags {
     return ($artist, $album, $discnum, @tags);
 }
 
-# Hash of Hashes of Lists Push
-sub hhlp {
-    my $hash = shift;
-    my $key1 = shift;
-    my $key2 = shift;
-    my $val = shift;
-
-    return push(@{$hash->{$key1}->{$key2}}, $val);
-}
-
 sub bork_tags {
     my $h = shift;
     my @result;
@@ -122,7 +112,7 @@ sub flac {
     my (@bork, @titles);
     for my $tag (@tags) {
         if ($tag =~ /^([^[]+)\[(\d+)]=(.*)/) {
-            hhlp(\%things, $2, $1, $3);
+            push(@{$things{$2}->{$1}}, $3);
         } elsif ($tag =~ /^ARTIST=/) {
             push(@artist, $tag);
         } else {