foreach my $type (ref($entry->{type}) eq 'ARRAY' ? @{$entry->{type}} : $entry->{type})