Hagbone has asked for the wisdom of the Perl Monks concerning the following question:

A super search on Geo::PostalCode only turned up one hit ....

I've got a MySql database that contains a postal code for each record. I'd like to create search functionality that would allow a person to enter their postal code, and the program would retrieve the records that have a postal code within a prescribed distance from postal code entered for the search.

A search at CPAN turned up Geo::PostalCode, but in the notes section, the comment was:

"This module is in early alpha stage. It is suggested that you look over the source code and test cases before using the module. In addition, the API is subject to change"

So, my question is, has anyone used Geo::PostalCode in a similar situation, and if so, can you comment as to what is important to consider before using this module? From its description, it seems like a straightforward way to deal with zipcode related searches

  • Comment on Is Geo::PostalCode ready for prime time?

Replies are listed 'Best First'.
Re: Is Geo::PostalCode ready for prime time?
by El Linko (Beadle) on May 31, 2004 at 21:09 UTC
    Can't comment on the module itself but the cpan testers page isn't comforting. 17 fails and 0 passes just isn't a good thing.

    Update : Guess I should have read the documentation a little more. You need to load the data into the berkeley db before any of the tests pass. The test results could make that a little clearer....
      17 fails and 0 passes just isn't a good thing.
      I would just look at the tests of the last distribution, or the one I was trying to install. In general, consistent failure like this indicates a poorly written (or just not cpan-tester friendly) test suite.
      Update : Guess I should have read the documentation a little more. You need to load the data into the berkeley db before any of the tests pass. The test results could make that a little clearer....
      I would disagree with you there. The module should throw a critical error if the required databases don't exist, and the test suite should skip all the tests, although it would be a better idea to just include the data in the distribution.

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Is Geo::PostalCode ready for prime time?
by theorbtwo (Prior) on May 31, 2004 at 20:55 UTC

    Well, I havn't taken a detailed look at the module yet, but I'm going to comment anyway... about it's name, which is downright abysmal.

    A "postal code" is a generic term, refering to similar schemes that exist in many countries. The term for the purticular scheme of codes that exists in the US is ZIP code. The module should be named Geo::PostalCode::US or Geo::ZIPCode, not Geo::PostalCode.