11 Oct 05:47
Re: bioperl.lisp, bioperl-object-start, use, and use base?
From: Chris Fields <cjfields <at> illinois.edu>
Subject: Re: bioperl.lisp, bioperl-object-start, use, and use base?
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-10-11 03:47:00 GMT
Subject: Re: bioperl.lisp, bioperl-object-start, use, and use base?
Newsgroups: gmane.comp.lang.perl.bio.general
Date: 2008-10-11 03:47:00 GMT
Yeah, I forgot the import bit. It really applies mainly when you 'use
Foo qw(bar baz)' but it's always helpful to keep in mind when it applies
-c
On Oct 10, 2008, at 4:25 PM, George Hartzell wrote:
>
> 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
>>
RSS Feed