Just another Perl shrine | |
PerlMonks |
Re: Bundling commonly-used modules into a toolsetby creamygoodness (Curate) |
on Oct 25, 2005 at 19:04 UTC ( [id://502842]=note: print w/replies, xml ) | Need Help?? |
Delicious! This is what I had hoped Toolkit would be!
I'd like to use this on a distro destined for CPAN which numbers 47 modules and counting. One of those modules is a base class for almost all the others, supplying new(), etc. A typical module begins:
Now, say I have other classes which inherit from Restaurant::People: Customer, Chef, Server, Busser, Manager, etc. The ultimate in laziness would be this, if I turned Restaurant::Util::Class into a ToolSet-enabled superclass:
However, it doesn't look like I can get away with that -- the code needs to look like this instead, correct?
That's still going to save a bunch of space. I always need strict and warnings, nearly always need Carp, and often need Scalar::Util, so I'll just throw 'em all in the ToolSet. Sweet! Regarding the Alpha status: I didn't see a warning anywhere in the docs. Is the interface stable? Without any explicit notice, I infer that distributions are in Beta if the version is less than 1.0.
In Section
Meditations
|
|