| Module Info
| Add a review of base-ball
The author has clarified the usage of this module in the POD, and so while I am still not a fan of the technique it uses ((mis)using inheritance to make many functions available as "class" methods), I will up the documentation score since he explains and caveats things pretty well.
This module is another example of why Perl 5 OO has such a bad name. Inheritence and IS-A relationships should not be used to import tons of methods into a single namespace (aka - the God Object, see wikipedia or the C2 wiki if you don't know what it is). This module should *not* be in the base:: namespace, because honestly it has *nothing* to do inheritence. And this is just the tip of the iceberg (yes, I think this module has many hidden dangers along with its total warping of OO theory) see the RT bug queue for a good discussion of these dangers.
I'm disappointed these two reviews gave a one. It seems they misunderstood the intention of the module. (0.0.3 adds some 'don't do god classes or misuse ISA' and 'only use it when' in the POD for good measure)
But still I'd like to address the misconceptions and misunderstandings.
Its not trygin to enforce any inheritance practice, its just a small tool that does what it does if that whats you need. The POD is very descriptive of that. For someone to decide they need this module they;d have already had to have created their inheritance structure.
The *only* thing it does is recursively use base based on the arguments you give it as per the POD.
Any way here goes:
> This module is another example of why Perl 5 OO has such a bad name.
ok, so you don't like L<base> either then? Thats all its doing
> Inheritence and IS-A relationships should not be used to
> import tons of methods into a single namespace
All it does is use base as per its arguments. All its doing is calling use base for you a few times. A shortcut for what you'd have to code normally.
Its up to the coder to not misuse inheritance.
> ... This module should *not* be in the base:: namespace,
In fact it should be in the base name space because its a shortcut to use of base. Nothing more nothing less
> because honestly it has *nothing* to do inheritence.
But you just implied it was misusing inheritance and now it has nothing to do with it? All it "has to do with" is described in 'DESCRIPTION'.
(and 0.02 doesn't even say 'inheritance', IS-A, or ISA)
> And this is just the tip of the iceberg (yes, I think this module has many hidden dangers
> along with its total warping of OO theory) see the RT bug queue for a good discussion
> of these dangers.
This concern really has nothing to do with this module but inheritance theory in general. All this does is use base a few times for you based on your args as per the POD. So it only makes god classes if the coder is making a god class and misuses @ISA if the coder is misusing @ISA. Of course they can do the exact same thing by calling use base several times to accomplish the same thing.
If you read the DESCRIPTION of what it does its very very simple. Can it be misused? Sure, but so can use base, so can a car, so can a knife, so can fire...
Also the rt you pointed out ( L<rt.cpan.org/Public/Bug/Display.html?i...; ) has some excellent info of what not to use this module for and why it is or is not some of the items pointed out.
> Another unnecessarily silly module: The name lacks any clue about what the module
> actually does, saying "ball" rather than "all".
It was meant to be a (silly) linguistic play on words and slight reference to America's favorite pasttime: Perl!.
Technically base::recursive would be more accurate. Sorry if the joke was confusing, I was hoping the NAME part would explain the joke.
Its been very handy and worked very well for what its intended for and since it was intended to be rarely used I figured a little humor would be ok.
> It's also rather too magic to actually use, since adding any module suddenly
> means your code is inheriting from it.
But you'd only add a module if you wanted to inherit from it. Whats so magical about that? Its as complex and magical as:
use base 'Foo::Utils';
use base 'Foo::Utils::Sys';
use base 'Foo::Utils::Etc';
> Module::Pluggable is much more practical.
It may suit your needs better true, but its an entirely different idea. Have a gander: L<Module::Pluggable> and feel free to use it. Its a great module.
Also how is Module::Pluggable not 'too magical to actually use' if base::ball is? Have you actually *looked* at either? Do you actually understand what either is doing?
I also recommend L<Moose> for even sexxier Perl 6 style classing/objects. Of course its veeeery magical and "The name lacks any clue about what the module actually does", (all of which is not bad)
Another unnecessarily silly module: The name lacks any clue about what the module actually does, saying "ball" rather than "all". It's also rather too magic to actually use, since adding any module suddenly means your code is inheriting from it. Module::Pluggable is much more practical.