From da6fe80e84a20aaf405a89bd0203d9ce1abc097d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 16 Dec 2017 14:09:16 +1300 Subject: Remove "scalar" call entirely Context with the lhs of the == operator forces this into scalar context anyway, making this call redundant. --- lib/Monitoring/Plugin/Getopt.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm index 65c872f..c8033d0 100644 --- a/lib/Monitoring/Plugin/Getopt.pm +++ b/lib/Monitoring/Plugin/Getopt.pm @@ -392,7 +392,7 @@ sub arg ); # Named args - if (exists $params{$_[0]} && scalar @_ % 2 == 0) { + if (exists $params{$_[0]} && @_ % 2 == 0) { %args = validate( @_, \%params ); } -- cgit v1.2.3-74-g34f1