Algorithm-BinPack

 view release on metacpan or  search on metacpan

lib/Algorithm/BinPack.pm  view on Meta::CPAN

}

=item add_item

Adds an item to be packed into a bin. Required named arguments are 
'label' and 'size', but any others can be specified, and will be saved. 
An optional 'bin' argument can be used to manually put an item into the 
specified bin.

    $bp->add_item(label => 'one',  size => 1);
    $bp->add_item(label => 'two',  size => 2, desc => 'The second numeral');
    $bp->add_item(label => 'zero', size => 3, bin => 0);
    $bp->add_item(qw(label three size 3));
    $bp->add_item(qw(label four size 4 random key));

=cut

sub add_item {
    my $self = shift;
    my $item = { @_ };



( run in 0.767 second using v1.01-cache-2.11-cpan-39bf76dae61 )