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 ###################################################################### +##
Back to
Seekers of Perl Wisdom