diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-09-24 18:45:59 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-09-24 18:45:59 +0000 |
commit | 6625e6a0d2a4cec99339b8b526035592dcd4418c (patch) | |
tree | 85971687f4bfef6a7f30595522f2454c73f4b2af /lib/Nagios/Plugin/Getopt.pm | |
parent | 7fb5ed0f0a95ce5817e0b0f7c3bba91968393d49 (diff) | |
download | monitoring-plugin-perl-6625e6a0d2a4cec99339b8b526035592dcd4418c.tar.gz |
Help, usage and version output go to stdout now, rather than stderr
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1795 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'lib/Nagios/Plugin/Getopt.pm')
-rw-r--r-- | lib/Nagios/Plugin/Getopt.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Nagios/Plugin/Getopt.pm b/lib/Nagios/Plugin/Getopt.pm index 743bf7e..b21dc6d 100644 --- a/lib/Nagios/Plugin/Getopt.pm +++ b/lib/Nagios/Plugin/Getopt.pm | |||
@@ -60,9 +60,7 @@ sub _die | |||
60 | my $self = shift; | 60 | my $self = shift; |
61 | my ($msg) = @_; | 61 | my ($msg) = @_; |
62 | $msg .= "\n" unless substr($msg, -1) eq "\n"; | 62 | $msg .= "\n" unless substr($msg, -1) eq "\n"; |
63 | # Set errno to UNKNOWN for die return code | 63 | Nagios::Plugin::Functions::_nagios_exit(3, $msg); |
64 | local $! = 3; | ||
65 | die $msg; | ||
66 | } | 64 | } |
67 | 65 | ||
68 | # Return the given attribute, if set, including a final newline | 66 | # Return the given attribute, if set, including a final newline |