Re: Replacing "use base" with "use parent"

[email protected] (Stevan Little)
Newsgroups perl.moose
Message-ID <[email protected]>
On Oct 10, 2012, at 8:41 AM, Olivier Mengué wrote:
> 2012/10/9 Jesse Luehrs <[email protected]>
> 
> I'm not sure I see the benefit here, at least as long as we're still
>> supporting 5.8.
> 
> 
> Beside my original extract of the POD of each modules, just have a look to
> base.pm code vs parent.pm.
> 
> Also parent.pm is dual-life, so 5.8 compat is not an issue, except for the
> additional dependency.
> And parent.pm has already more than 500 CPAN distributions directly
> depending on it (according to MetaCPAN reverse dependency results), so many
> CPAN users still using perl 5.8 already have it.
> 
> 
>> Is there a particular reason you're interested in this
>> change?
> 
> 
> I've started my quest to kill 'use base' and 'use base "Exporter"' a few
> years ago and have helped to get 'parent' spread.
> (I've ongoing work to fix Perl::Critic and add a Perl::Critic policy: my
> first step is to get rid of base.pm in Perl::Critic itself, but this takes
> time : 5 months in RT#75300)
> 
> But as long as high profile modules such as Moose still use 'base' instead
> of 'parent', 'base' will never die. People think « if Moose uses it, it's
> fine to use it in my code », and 'parent' keeps being unnoticed. So keeping
> 'use base' in Moose helps to keep 'base' alive.
> 
> Finally, if using Moose is modern Perl, Moose should use 'parent' and show
> the light to its users.


I don't think this last sentence can be argued with, my vote it to merge it.

- Stevan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.