Re: Replacing "use base" with "use parent"
[email protected] (Steve)
| Newsgroups | perl.moose |
|---|---|
| Organization | Matsch Systems, Inc. |
| Message-ID | <[email protected]> |
On 10/10/2012 8:41 AM, Olivier Mengué wrote: > 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. 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. Olivier. FWIW, these all seem like legitimate reasons to abolish the use of Base.pm within Moose. Our company uses Moose and 5.8.8 perl currently, so even though there may be a few tweaks necessary, it seems like the right thing to do. Steve