metaperl has asked for the wisdom of the Perl Monks concerning the following question:
Math::Round::Var has the following function:
Please notice that there is neither a warning or exception if a number is not supplied. Is lack of a number argument an exception? Or should it throw a warning? Or is everything OK as it is?###################################################################### +## =head2 round $number = $rounder->round($number); =cut sub round { my $self = shift; my $rnd = $self->{precision}; my $number = shift; return(sprintf("%0.${rnd}f", $number)); } # end subroutine round definition ###################################################################### +##
|
---|
Replies are listed 'Best First'. | |
---|---|
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 | |
by metaperl (Curate) on Aug 31, 2011 at 02:18 UTC | |
Re: Math::Round::Var::round() takes no action when a number is not supplied
by BrowserUk (Patriarch) on Aug 30, 2011 at 17:04 UTC | |
by metaperl (Curate) on Aug 31, 2011 at 02:25 UTC | |
by BrowserUk (Patriarch) on Aug 31, 2011 at 02:34 UTC | |
by metaperl (Curate) on Aug 31, 2011 at 15:38 UTC | |
by BrowserUk (Patriarch) on Aug 31, 2011 at 15:59 UTC |
Back to
Seekers of Perl Wisdom