in reply to Im missing something small here? (dereferencing complex references)

Your assignment to the %macro hash is over writing the last entry because $type is the same for item you want to add:
$macro{$type} = { $var => $rval } if ( $class eq "macro" );
should be
$macro{$type}{$var} = $rval if ( $class eq "macro" );
You can also get rid of the temp assignment into an array, by doing this for rval:
my $rval = [ split(/,/,$rval) ];