[Nagiosplug-devel] Nagios::Plugin with scientific notation
Vonnahme, Nathan
nathan.vonnahme at bannerhealth.com
Thu Mar 13 18:19:39 CET 2008
Sorry, I have been negelecting the Nagios lists for a long time, but I
don't see any replies to your question from Feb 1.
Larry Wall said in one of his State of the Onion speeches that it's
better for programs (and also community members) to be "generous in what
you accept for input and strict in what you produce as output".
So I think the sprintf solution is better, and the test that catches it,
a good test!
-n
> -----Original Message-----
> From: nagiosplug-devel-bounces at lists.sourceforge.net
[mailto:nagiosplug-
> devel-bounces at lists.sourceforge.net] On Behalf Of Ton Voon
> Sent: Friday, February 01, 2008 12:45 AM
> To: Nagios Plugin Development Mailing List
> Subject: [Nagiosplug-devel] Nagios::Plugin with scientific notation
>
> Hi!
>
> I've been looking at some of the test failures that CPAN is reporting
> about the Nagios::Plugin module and I think I've fixed most of them
> now. However, this one still occurs:
>
http://www.nntp.perl.org/group/perl.cpan.testers/2007/12/msg887150.html
>
> It looks like on some systems, perl returns the scientific notation
> for the value part of the performance data.
>
> You can see this on any system by running:
>
> perl -e '$a = 0.000053; print $a,$/'
>
> I get 5.3e-05 on my MacOSX 10.5 and Debian 4.0. For some reason, the
> test on darwin is giving this scientific notation when other systems
> are not.
>
> So the question is: Is scientific notation a problem? If not, I'll
> amend the test so that it doesn't fail. But if it is, should we
> specifically state a sprintf output so that you get a consistent
> output of the value?
>
> Ton
>
> http://www.altinity.com
> UK: +44 (0)870 787 9243
> US: +1 866 879 9184
> Fax: +44 (0)845 280 1725
> Skype: tonvoon
>
>
>
------------------------------------------------------------------------
-
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________________
> Nagios Plugin Development Mailing List
Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at
https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any
issue.
> ::: Messages without supporting info will risk being sent to /dev/null
More information about the Devel
mailing list