[bop-devel] quick fix for LinkPoint.pm
Ivan Kohler
ivan at 420.am
Wed Jan 24 17:39:15 PST 2007
On Wed, Jan 24, 2007 at 05:00:32PM -0800, Jo Rhett wrote:
> On Jan 20, 2007, at 1:17 PM, Phil Lobbes wrote:
> >Also, LinkPoint.pm
> >uses the Perl module provided by linkpoint (lpperl.pm) which itself
> >has
> >a few places where it will die().
>
> And print() and everything else that a library should *never* do.
>
> I'm going to rewrite the LinkPoint.pm module to include all of
> lpperl.pm, while removing redundancy in that module and replacing all
> the "stupid things you should never do in a library" in it.
>
> Soon, I promise. Sooner if someone is willing toss some money at me
> to finish it ASAP :-)
Personally, I'd prefer a reverse-engineered route that doesn't use the
lpperl.pm code, so that the resulting module can be licensed freely.
Using lpperl.pm seems like it would make the code derivitive of
Linkpoint's code and probably not redistributable.
Same goes for pretty much any of the processor modules that (non-free)
code from the processors.
Unfortunately, nobody's ever thrown money at me for this yet either. :)
> >Based on my experience I would recommend this for any calls to submit.
> >This use of die() and croak() is not unique to just LinkPoint.pm, but
> >infact is typical of a number of Business::OnlinePayment backends and
> >the modules provided by the payment services that the backends rely
> >on.
> > ... ...
> >Ideas on how to improve this are certainly welcome!
>
> Yeah, and I think that it's a horrible way to do things and I'll like
> to get rid of it entirely. It makes introspection completely
> impossible. If the BOP module needs to refer to an external library
> that can't be rewritten then it should use eval() itself, and not
> require the caller of the BOP module to know whether or not to eval it.
>
> Sorry, that's my "sharp commentary without remembering that someone
> might take offense" mode of talking. Forgive me, and focus on what
> I'm saying if you can.
I don't think anyone is taking offense or disagreeing with you, or
defending the current state of the exception handling mechanism, I'm
just explaining the current state of things. Again you're certainly
welcome to improve upon it as I suggested in my first message...
--
_ivan
More information about the bop-devel
mailing list