in reply to Bundling commonly-used modules into a toolset
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:
package Restaurant::People; use strict; use warnings; use base qw( Restaurant::Util::Class ); use Carp; use Scalar::Util qw( blessed dualvar );
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:
package Restaurant::People::Cook; use base qw( Restaurant::People );
However, it doesn't look like I can get away with that -- the code needs to look like this instead, correct?
package Restaurant::People::Cook; use base qw( Restaurant::People ); use Restaurant::Util::ToolSet;
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bundling commonly-used modules into a toolset
by xdg (Monsignor) on Oct 26, 2005 at 00:52 UTC | |
by creamygoodness (Curate) on Oct 28, 2005 at 17:55 UTC |