Skip to content

Commit

Permalink
Update ARGV check
Browse files Browse the repository at this point in the history
The current ARGV check 'defined(@array)' is deprecated in Perl; replace
this with '@argv'.  When the array is referenced in a scalar context
(e.g. if(@argv)), the expression will evaluate to the length of the
array, which is perhaps (I mean, who reallys knows, it's Perl) a safer
way to check for args anyway.

Signed-off-by: James Dinan <[email protected]>
  • Loading branch information
James Dinan committed Mar 13, 2018
1 parent 3d04f27 commit 24a07c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/testrunner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
# If arguments were specified on the CLI, use those as a filter for
# which tests to run. Abort if a test was specified for which we do
# not have a configuration.
if (defined(@ARGV)) {
if (@ARGV) {
my $tests_to_run;
foreach my $arg (@ARGV) {
my $found = 0;
Expand Down

0 comments on commit 24a07c5

Please sign in to comment.