Skip to content

Instantly share code, notes, and snippets.

@perigrin
Created August 11, 2009 02:59
Show Gist options
  • Select an option

  • Save perigrin/165599 to your computer and use it in GitHub Desktop.

Select an option

Save perigrin/165599 to your computer and use it in GitHub Desktop.
sub find_in_box {
my ( $self, $box ) = @_;
my $where = {
longitude =>
[ -and => { '<', \$box->{min_lon} }, { '>', \$box->{max_lon} } ],
latitude =>
[ -and => { '>', \$box->{min_lat} }, { '<', \$box->{max_lat} } ],
};
$self->directory->search($where);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment