Math::TotalBuilder 1.10 review

Download
by rbytes.net on

Math::TotalBuilder is a Perl module to build a whole total out of valued pieces. SYNOPSIS use Math::TotalBuilder; my %lsd

License: Perl Artistic License
File size: 4K
Developer: Ricardo SIGNES
0 stars award from rbytes.net

Math::TotalBuilder is a Perl module to build a whole total out of valued pieces.

SYNOPSIS

use Math::TotalBuilder;

my %lsd = ( pound => 240, shilling => 20, penny => 1 );

# units for 952 pence
my %tender = build(%lsd, 952);

# total value of 3, 21, 98
my $wealth = total(%lsd, { pound => 3, shilling => 21, penny => 98 });

# best better representation of 18, 6, 40
my %moolah = build(%lsd,
total (%lsd, { pound => 18, shilling => 6, penny => 40 }));

This module provides two subroutines, build and total, which can be used to handle quantities of valued items. These can be used to build the proper tender to represent a quantity of money, to compose a mass from standard weights, to convert a difference of seconds to a set of time units, or other similar calculations.

Requirements:
Perl

Math::TotalBuilder 1.10 keywords