develooper Front page | perl.perl5.porters | Postings from May 2007

Re: use parent 'Some::Class' @import_list;

Thread Previous | Thread Next
May 2, 2007 05:48
Re: use parent 'Some::Class' @import_list;
Message ID:
--- Brandon Black <> wrote:

> Personally, I think most people are better off without "use base".
> For MI, it's just:
> use Foo;
> require Bar;
> our @ISA = qw/Foo Bar/;
> You can choose require vs use to decide whether you want import
> called
> or not, and since it is assignment rather than pushes, it's not an
> efficiency issue like the individual push statements of

It's worth noting that "our @ISA" generally means that base classes are
determined later than with "use base", thus ensuring that there's a
subtle, but distinct, difference.  Some trying to call inherited
methods before the @ISA gets assigned is going to be bitten by the
above code.


Buy the book --
Perl and CGI --

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About