diff options
| author | Tom Ryder <tom@sanctum.geek.nz> | 2017-12-16 13:34:38 +1300 |
|---|---|---|
| committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-12-16 13:34:38 +1300 |
| commit | 6518f384cc20561ddc0df32414a714164dd2eb95 (patch) | |
| tree | ac831a94b394a2862418308c72f6548a51469522 /lib | |
| parent | afa636bc749f76aed77380d39269bceecdd879d2 (diff) | |
| download | monitoring-plugin-perl-6518f384cc20561ddc0df32414a714164dd2eb95.tar.gz | |
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.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Monitoring/Plugin/Getopt.pm | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
| 393 | 393 | ||
| 394 | # Named args | 394 | # Named args |
| 395 | if (exists $params{$_[0]} && scalar @_ % 2 == 0) { | 395 | if (exists $params{$_[0]} && scalar @_ % 2 == 0) { |
| 396 | %args = validate( @_, { %params }); | 396 | %args = validate( @_, \%params ); |
| 397 | } | 397 | } |
| 398 | 398 | ||
| 399 | # Positional args | 399 | # Positional args |
