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

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

Thread Previous | Thread Next
Brandon Black
May 2, 2007 09:48
Re: use parent 'Some::Class' @import_list;
Message ID:
On 5/2/07, Ovid <> wrote:
> --- 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.

Right, that and the "require" comment earlier basically amount to
knowing what's in BEGIN and what isn't though (or putting them in
BEGIN if necessary).

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