Slash Boxes
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 ]

Journal of LTjake (4001)

Tuesday February 28, 2006
03:27 PM

API? What API?

[ #28826 ]

APIs, in general, are immutable. If you claim that method x with parameters y does z -- your code should continue to do that regardless of the implementation. To be fair, things change, methods are deprecated, and disappear usually after a major revision.

I don't think i realized how true Alias' post on the subject was until today.

Some background: I'm running a web-based list archiver which uses Catalyst and Email::Store under the hood. All seemed well until one day it magically stopped working -- at least under mod_perl; vanilla CGI, though slow, was able to make things go.

After a day or so of sporatic debugging I was able to trace it down to this: (from Net::Domain::TLD's Changes file)

1.63  Wed Jan 25 12:00:00 2006
    - Dropped OO code ( There are previous versions of module if anyone needs it )

The problem can be described as this: Email::Store::List needs Mail::ListDetector, which needs Email::Valid, which tries to do Net::Domain::TLD->new if it finds Net::Domain::TLD on the filesystem. Hence, bustage.

Downgrading to 1.62 made the problem go away, but, seriously, don't screw with your API, people. Sheesh

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • What I'm also noticing now is how damaging recursiveness can be.

    It's not so much that it magnifies things (which can be good an bad) but that so many people only consider some change they make to be small, and recursiveness means that what may SEEM to be a small change can actually be amplified up to be a huge change.