use map instead for on creating hash tables

This commit is contained in:
Milan
2020-03-05 22:16:54 +01:00
parent da5f7f673d
commit 41b0495c2e
24 changed files with 40 additions and 144 deletions

View File

@@ -191,10 +191,7 @@ sub extractMeta ($$) {
if ( defined $comments ) {
#build index for meta already defined
my $meta_keys = {};
for my $pair (@$meta) {
$meta_keys->{ $pair->{name} . '=' . $pair->{value} } = 1;
}
my $meta_keys = { map { $_->{name}."=".$_->{value} => 1 } @$meta };
while ( $comments =~ /\~\~META\:(.+?)\=(.+?)\~\~/g ) {
my $name = $1;