Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Math::Round::Var::round() takes no action when a number is not supplied

by toolic (Bishop)
on Aug 30, 2011 at 17:04 UTC ( [id://923267]=note: print w/replies, xml ) Need Help??


in reply to Math::Round::Var::round() takes no action when a number is not supplied

Did you try it? I get a warning:
use Math::Round::Var; my $rnd = Math::Round::Var->new(0.01); # rounds to two decimal places: print $rnd->round(), "\n"; __END__ Use of uninitialized value in sprintf at .../Math/Round/Var.pm line 22 +9. 0.00
The module's source code uses warnings.
  • Comment on Re: Math::Round::Var::round() takes no action when a number is not supplied
  • Download Code

Replies are listed 'Best First'.
Re^2: Math::Round::Var::round() takes no action when a number is not supplied
by metaperl (Curate) on Aug 31, 2011 at 02:18 UTC
    Did you try it?
    I shore did.
    I get a warning
    That warning came from Perl - the subroutine simply assumed you wanted to round the number zero - an undefined value was coerced to zero in context.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://923267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-20 03:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found