[monitoring-plugin-perl] Remove unneeded params around "scalar" call

Tom Ryder git at monitoring-plugins.org
Fri Dec 22 11:50:07 CET 2017


 Module: monitoring-plugin-perl
 Branch: master
 Commit: afa636bc749f76aed77380d39269bceecdd879d2
 Author: Tom Ryder <tom at sanctum.geek.nz>
   Date: Sat Dec 16 13:30:52 2017 +1300
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugin-perl/commit/?id=afa636b

Remove unneeded params around "scalar" call

Operator precedence allows leaving these out.

---

 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 048b0ef..b5a9ab4 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]} && scalar @_ % 2 == 0) {
     %args = validate( @_, { %params });
   }
 



More information about the Commits mailing list