Text::Metaphone 2.0: 8 years in the making

schwern on 2007-06-30T07:10:20

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!


version 2?

bart on 2007-06-30T09:35:21

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.

Re:version 2?

sigzero on 2007-06-30T13:21:31

Isn't that really up to him? He could have changed the version to 5 if he wanted to.

Re:version 2?

bart on 2007-06-30T14:30:05

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.

Re:version 2?

bart on 2007-07-01T10:54:33

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.

Re:version 2?

Aristotle on 2007-07-01T17:29:36

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?

Re:version 2?

schwern on 2007-07-01T20:02:41

You can read my philosophy of version numbers elsewhere.

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: 2.00. So here it is.

Seeing as how I went from 1.96 to 2.00 this isn't a big leap.

These decisions predate the X.Y_Z alpha versioning scheme in use on CPAN, but I'd probably do it the same way now seeing as how Text::Metaphone isn't exactly a critical module that requires a lengthy official alpha process to avoid breaking CPAN.