Algorithm-QuadTree
view release on metacpan or search on metacpan
lib/Algorithm/QuadTree.pm view on Meta::CPAN
# List::Util 1.45 added 'uniqstr'
use constant HAS_LIST_UTIL => eval { require List::Util; List::Util->VERSION('1.45'); 1 };
sub new
{
my $self = shift;
my $class = ref($self) || $self;
my %args = @_;
my $obj = bless {}, $class;
for my $arg (qw/xmin ymin xmax ymax depth/) {
unless (exists $args{"-$arg"}) {
carp "- must specify $arg";
return undef;
}
$obj->{uc $arg} = $args{"-$arg"};
}
( run in 0.810 second using v1.01-cache-2.11-cpan-de7293f3b23 )