[Bioperl-l] bioperl.lisp, bioperl-object-start, use, and use base?

George Hartzell hartzell at alerce.com
Fri Oct 10 17:25:36 EDT 2008


Thanks.  I that's what I thought/googled.  I was afraid that it was
some backward compatability best practice or something.  Two small
edits (scoured from perlmonks)

Chris Fields writes:
 > No, it shouldn't be necessary. "use 'Foo'" is the same as:
 > 
 > BEGIN {
 >     require Foo;
 > }

It also calls that package's import, so it's:

BEGIN {
    require Foo;
    Foo->import();
}

 > 
 > ... and "use base 'Foo'" is the same as:
 > 
 > BEGIN {
 >     require Foo;
 >     push @ISA, 'Foo';
 > }
 > 

and this doesn't to the ->import().

Thanks,

g.

 > chris
 > 
 > On Oct 10, 2008, at 3:57 PM, George Hartzell wrote:
 > 
 > >
 > > Why does the template provided by bioperl-object-start both
 > >
 > >  use Bio::Root::Root;
 > >
 > > and
 > >
 > >  use base qw(Bio::Root::Root);
 > >
 > > Is the first one necessary for some reason?
 > >
 > > g.
 > >
 > > _______________________________________________
 > > Bioperl-l mailing list
 > > Bioperl-l at lists.open-bio.org
 > > http://lists.open-bio.org/mailman/listinfo/bioperl-l
 > 
 > Christopher Fields
 > Postdoctoral Researcher
 > Lab of Dr. Marie-Claude Hofmann
 > College of Veterinary Medicine
 > University of Illinois Urbana-Champaign
 > 
 > 
 > 
 > 


More information about the Bioperl-l mailing list