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

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

Thread Previous | Thread Next
Ronald J Kimball
April 29, 2007 18:42
Re: use parent 'Some::Class' @import_list;
Message ID:
On Sun, Apr 29, 2007 at 08:11:50PM -0500, 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

Avoiding a call to import seems like the wrong reason to choose require
over use.  You should choose require if you want to load the module at
run-time rather than at compile-time.  If you simply don't want import to
be called, you can do C<< use Bar (); >>.


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