repo.or.cz
/
monitoring-plugin-perl.git
/
commitdiff
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
raw
|
patch
|
inline
|
side by side
(parent:
6518f38
)
Remove "scalar" call entirely
17/head
author
Tom Ryder
<
[email protected]
>
Sat, 16 Dec 2017 01:09:16 +0000
(16 14:09 +1300)
committer
Tom Ryder
<
[email protected]
>
Sat, 16 Dec 2017 01:09:16 +0000
(16 14:09 +1300)
Context with the lhs of the == operator forces this into scalar context
anyway, making this call redundant.
lib/Monitoring/Plugin/Getopt.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Monitoring/Plugin/Getopt.pm
b/lib/Monitoring/Plugin/Getopt.pm
index
65c872f
..
c8033d0
100644
(file)
--- 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 );
}