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 };
use constant BACKEND_UNIQUE_RESULTS => $backend->can('UNIQUE_RESULTS') ? $backend->UNIQUE_RESULTS : 0;

sub new
{
	my $self  = shift;
	my $class = ref($self) || $self;
	my %args = @_;

	my $obj = bless {}, $class;

	for my $arg (keys %args) {
		if ($arg =~ s{^-}{}) {
			$obj->{uc $arg} = $args{"-$arg"};
		}
	}

	for my $arg (qw/xmin ymin xmax ymax depth/) {
		unless (exists $obj->{uc $arg}) {
			carp "- must specify $arg";



( run in 0.589 second using v1.01-cache-2.11-cpan-0b5f733616e )