Algorithm-BinPack-2D

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

# vim: set expandtab ts=4 sw=4 nowrap ft=perl ff=unix :
use strict;
use warnings;
use Module::Build;

my $build = Module::Build->new(
    module_name => 'Algorithm::BinPack::2D',
    dist_author =>
      'Tasuku SUENAGA a.k.a. gunyarakun <tasuku-s-cpanATATtitech.ac>',
    license => 'perl',

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

# vim: set expandtab ts=4 sw=4 nowrap ft=perl ff=unix :
package Algorithm::BinPack::2D;

use strict;
use warnings;
use Carp;

our $VERSION = 0.03;

=head1 NAME

t/00_compile.t  view on Meta::CPAN

# vim: set expandtab ts=4 sw=4 nowrap ft=perl ff=unix :
use strict;
use Test::More;

use_ok $_ for qw(
  Algorithm::BinPack::2D
);

done_testing;

t/01_basic.t  view on Meta::CPAN

# vim: set expandtab ts=4 sw=4 nowrap ft=perl ff=unix :
use strict;
use warnings;
use Test::More;
use Algorithm::BinPack::2D;

subtest 'Basic algorithm' => sub {
    my $packer = Algorithm::BinPack::2D->new(
        binwidth  => 500,
        binheight => 400,
    );

t/02_error.t  view on Meta::CPAN

# vim: set expandtab ts=4 sw=4 nowrap ft=perl ff=unix :
use strict;
use warnings;
use Test::More;
use Test::Exception;
use Algorithm::BinPack::2D;

subtest 'Add a too big item' => sub {
    my $packer = Algorithm::BinPack::2D->new(
        binwidth  => 500,
        binheight => 400,



( run in 0.814 second using v1.01-cache-2.11-cpan-5b529ec07f3 )