Algorithm-BinPack

 view release on metacpan or  search on metacpan

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

=cut

sub new {
    my $name = shift;
    my $self = { @_ };

    checkargs($self, qw(binsize)) or return;

    $self->{bins} = [];

    bless $self, $name;
}

=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);



( run in 1.014 second using v1.01-cache-2.11-cpan-de7293f3b23 )