Box::Calc::Box - The container in which we pack items.
version 1.0200
my $box = Box::Calc::Box->new(name => 'Big Box', x => 12, y => 12, z => 18, weight => 20);
Constructor.
NOTE: All boxes automatically have one empty Box::Calc::Layer added to them.
An identifying name for your box.
The interior width of your box.
The interior length of your box.
The interior thickness of your box.
The weight of your box.
Returns the weight of the items in this box.
Returns how full the box is in the x dimension.
x
Returns how full the box is in the y dimension.
y
Returns how full the box is in the z dimension.
z
Returns a generated unique id for this box.
Returns the name of the box.
Returns an array reference of the Box::Calc::Layers in this box.
Returns the weight assigned to the void space left in the box due to void space filler such as packing peanuts. Defaults to 70% of the box weight.
Calculates and returns the weight of all the layers in this box, including the weight of this box and any packing filler (see void_weight).
Adds a new Box::Calc::Layer to this box.
Add a Box::Calc::Item to this box.
Returns 1 on success or 0 on failure.
The Box::Calc::Item instance you want to add to this box.
Returns a scalar with the weight of the box and a hash reference of all the items in this box.
Returns a description of the box. Example:
{ x => 5, y => 6, z => 3, fill_x => 4, fill_y => '5.1', fill_z => 2, name => 'The Big Box', layers => [ ... ], id => 'xxx', weight => '6', calculated_weight => '12.35', }
To install Box::Calc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Box::Calc
CPAN shell
perl -MCPAN -e shell install Box::Calc
For more information on module installation, please visit the detailed CPAN module installation guide.