Re: [Perlunit-devel] What's up with "use base 'Error'"?
Status: Beta
Brought to you by:
mca1001
From: Piers C. <pdc...@bo...> - 2001-12-13 08:24:04
|
Matthias Ferber <mf...@hi...> writes: > Hi people, > > I've downloaded the most recent version of PerlUnit to get the > renamed classes, and I'm hitting a problem involving the use of the > Error class, which Test::Unit::Exception is derived from. (This is > new since v1.14.) Yup, that's Error from CPAN. You'll also need Class::Inner from CPAN (which forgets to mention that it needs Test::More) > Is this supposed to be Test::Unit::Error, or the Error.pm module from > CPAN? It looks to me like it's probably the CPAN module, and if that's > right, I don't think it's such a good thing. We don't have that module > installed here, and while we're loose enough that I can get it installed > without difficulty, I would think that having PerlUnit dependent on an > optional module rather cuts into its usefulness. Am I blowing against the > wind? I'm afraid you are. I'm strongly against reinventing wheels, and PerlUnit's hand rolled exception classes did just that. Error.pm gives us a good implementation of exception objects and some really useful syntax with which to use them. > (And, of course, is there an alternative?) Nope. Same goes for Class::Inner, which was originally written (by me) with this framework in mind as a replacement for the old, broken system. It got released to CPAN as a seperate entity because it has the potential to be useful outside PerlUnit (though I really should do another release with better documentation...) > By the way, I looked for discussion about this in the mailing list > archives but I couldn't find anything. Sorry if I missed something that > was there. If there's a way to search the archive I didn't see it. Grr. There is a searchable archive somewhere. Can't remember where now of course. (I'm so helpful aren't I). It probably got discussed in one of the 'Refactoring' threads. -- Piers "It is a truth universally acknowledged that a language in possession of a rich syntax must be in need of a rewrite." -- Jane Austen? |