[Nagiosplug-devel] Nagios::Plugin with scientific notation

Ton Voon ton.voon at altinity.com
Fri Feb 1 10:45:10 CET 2008


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





More information about the Devel mailing list