Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

schwern (1528)

schwern
  (email not shown publicly)
http://schwern.net/
AOL IM: MichaelSchwern (Add Buddy, Send Message)
Jabber: schwern@gmail.com

Schwern can destroy CPAN at his whim.

Journal of schwern (1528)

Saturday June 30, 2007
02:10 AM

Text::Metaphone 2.0: 8 years in the making

[ #33643 ]

Text::Metaphone was my first real module. I wrote it in 1997, a translation of some really awful and buggy C code from a book into slightly less buggy and awful C code. It got me my first real job, they were impressed at the little bit of C and XS I could do. Because I don't really know XS its had nasty memory leak.

Tonight, after the hackathon, I decided to look into updating my oldest modules. Text::Metaphone was at the top of the list with that damned memory leak. I threw out a pile of h2xs generated junk, detabified and converted the tests to Test::More. Then with all that old garbage out of the way I quickly realized that a string allocated in the C code wasn't getting free'd and plugged the leak. I also eliminated an unnecessary Perl function wrapper around the XS speeding things up by about 2 times.

So here we are, 8 years after the last release, with Text::Metaphone 2.0.

Next: D'oh::Year!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • You plugged a memory leak and that makes it a version 2.0? Gee, I don't really care how many years it has taken, but that seems to me like a too big a version jump, regardless.
    • Isn't that really up to him? He could have changed the version to 5 if he wanted to.
      • Or 6. That seems to be very popular with Microsoft. Sun, with Java, also pulls weird stunts in regard to version numbers. They've lost me on the way.

        Most Perl modules never even make it to version 1.00, not even after years and lots of heavy use. Win32::API for example.
      • Anyway, when a module version jumps from version 1.x to version 2.0, I've come to expect something more than a bug fix.
        • So the doubled performance and code cleanups don’t do it for you?

          And in any case, why would you care? Are you a heavy user of Text::Metaphone or something?

    • You can read my philosophy of version numbers elsewhere. [perl.org]

      Now, as to why I decided this release is version 2.00 can be found in the Changes log.

      Heh, what happened to 1.00? Never existed, it was supposed to be the gamma
      release of the pure perl version of the module. Skipped straight to 1.90,
      alpha XS version.

      1.00 would have been what I considered the "stable" Perl version but I decided to rewrite everything so I jumped over 1.00 directly to 1.9x to symbolize the big change leading up to a "stable" XS version