From: epg <> Date: Fri, 14 Apr 2006 18:29:15 +0000 (+0000) Subject: WTF! I just noticed that i forgot the part of hhlp that would X-Git-Url: https://diplodocus.org/git/flac-archive/commitdiff_plain/00f46bd354b18e53b46d84a1101f49136a0fc5cb WTF! I just noticed that i forgot the part of hhlp that would 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. --- diff --git a/fa-flacd b/fa-flacd index 69566ac..aeeff3c 100755 --- 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 {