Skip to content

Commit 106e4ff

Browse files
committed
Fix tag processing pipeline; BenGoldberg++
1 parent a7b4708 commit 106e4ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/ModulesPerl6/DbBuilder/Dist/Source.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use File::Spec::Functions qw/catfile/;
55
use JSON::Meth qw/$json/;
66
use Mojo::JSON qw/from_json/;
77
use Mojo::UserAgent;
8-
use Mojo::Util qw/slurp spurt decode/;
8+
use Mojo::Util qw/slurp spurt decode trim/;
99
use Try::Tiny;
1010

1111
use ModulesPerl6::DbBuilder::Log;
@@ -85,9 +85,11 @@ sub _parse_meta {
8585
} map {
8686
$tags->{$_} || $_ # perform substitution to common form
8787
} grep {
88-
length and not ref and not $no_index->{$_}
89-
} map uc, @{ $json->{tags} };
88+
length and not $no_index->{$_}
89+
} map { trim uc } grep { not ref } @{ $json->{tags} };
90+
9091
log warn => "`$json->{name}` does not have any tags";
92+
9193
return $self->_fill_missing( {%$json} );
9294
}
9395

0 commit comments

Comments
 (0)