Geo::Index is a Perl module for creating in-memory geographic point indices. Once indexed, fast searches can be run. This module supports search by radius, by bounding box and by proximity.
By default indexing is done for the Earth but other bodies can be indexed by supplying appropriates radii and circumferences.
See the project's wiki for full details and documentation.
This module is also available via CPAN.