Skip to content

Commit

Permalink
Shorten split in tidyall
Browse files Browse the repository at this point in the history
  • Loading branch information
josegomezr committed Nov 13, 2023
1 parent 6417c43 commit 1636ce9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/tidyall
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ sub perltidy_version {
# is to separate the qualifier from the actual version with a space.
#
# It's safe enough to assume that the last item is really the version.
my @version_components = split(' ', $version);
return pop(@version_components);
return split(' ', $version)[-1];
}

sub is_force_flag { $_ eq '--force' }
Expand Down

0 comments on commit 1636ce9

Please sign in to comment.