From 6518f384cc20561ddc0df32414a714164dd2eb95 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 16 Dec 2017 13:34:38 +1300 Subject: Pass params validation by ref not copy Since Params::Validate::validate() doesn't seem to actually mess with this specification, may as well pass a reference rather than bother copying the whole thing. diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm index b5a9ab4..65c872f 100644 --- a/lib/Monitoring/Plugin/Getopt.pm +++ b/lib/Monitoring/Plugin/Getopt.pm @@ -393,7 +393,7 @@ sub arg # Named args if (exists $params{$_[0]} && scalar @_ % 2 == 0) { - %args = validate( @_, { %params }); + %args = validate( @_, \%params ); } # Positional args -- cgit v0.10-9-g596f