Thread: [Perlunit-devel] What's up with "use base 'Error'"?
Status: Beta
Brought to you by:
mca1001
From: Matthias F. <mf...@hi...> - 2001-12-13 01:02:13
|
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.) 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? (And, of course, is there an alternative?) 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. Matthias |
From: Matthias F. <mf...@hi...> - 2001-12-13 01:04:14
|
> which Test::Unit::Exception is derived from. (This is new since v1.14.) I mean 0.14 of course... just looking forward to a release. :-) |
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? |
From: Matthias F. <mf...@hi...> - 2001-12-13 17:15:51
|
On Thu, 13 Dec 2001, Piers Cawley wrote: > > 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 OK... I'm the Johnny-come-lately, and you make a good point, so I'll cheerfully agree, except for a little peep about making sure the dependency is well documented, which I'm sure is either done or planned, so I'll just go away now. |
From: Piers C. <pdc...@bo...> - 2001-12-13 23:12:31
|
Matthias Ferber <mf...@hi...> writes: > On Thu, 13 Dec 2001, Piers Cawley wrote: >> > 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 > > OK... I'm the Johnny-come-lately, and you make a good point, so I'll > cheerfully agree, except for a little peep about making sure the > dependency is well documented, which I'm sure is either done or planned, > so I'll just go away now. It's in Makefile.PL, which means that if you install it using the CPAN module you'll have the chance to autoinstall CPAN. But I should probably stick something in the README as well. -- 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? |