Skip to content

Commit

Permalink
Move compile out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mdom committed Dec 15, 2016
1 parent 8e71ebf commit 3533f9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/squaretag
Expand Up @@ -248,6 +248,7 @@ sub find_untagged {
sub search_tags {
my ( $tag_spec, @files ) = @_;
my @found;
my $check = compile_search($tag_spec);
FILE:
for my $file (@files) {
my ( $base, $tags, $ext ) = split_file($file);
Expand All @@ -258,7 +259,6 @@ sub search_tags {
my ( $key, $val ) = split( /=/, $tag, 2 );
$tags{$key} = $val;
}
my $check = compile_search($tag_spec);
push @found, $file if $check->( \%tags );
}
return \@found;
Expand Down

0 comments on commit 3533f9b

Please sign in to comment.