Skip to content

Commit

Permalink
Fixed perlcritic level 5 badness - "return" statement followed by "so…
Browse files Browse the repository at this point in the history
…rt" at lines 60 and 77. Behavior is undefined if called in scalar context. (Severity: 5)
  • Loading branch information
LubosKolouch authored and reneeb committed Nov 8, 2020
1 parent 7f36990 commit b5ddfd9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Mojolicious/Plugin/FormFieldsFromJSON.pm
Expand Up @@ -57,7 +57,8 @@ sub register {
$app->helper(
forms => sub {
if (%configfiles) {
return sort keys %configfiles;
my @sorted_configfiles = sort keys %configfiles;
return @sorted_configfiles;
}

for my $dir ( @{ $self->dir } ) {
Expand All @@ -74,7 +75,8 @@ sub register {
}
}

return sort keys %configfiles;
my @sorted_configfiles = sort keys %configfiles;
return @sorted_configfiles;
}
);

Expand Down

0 comments on commit b5ddfd9

Please sign in to comment.