develooper Front page | perl.beginners | Postings from May 2007

Re: Module question

Thread Previous
From:
Jeff Pang
Date:
May 24, 2007 09:57
Subject:
Re: Module question
Message ID:
4655C3EA.4030400@earthlink.net
David Moreno Garza 写道:
> Jeff Pang wrote:
>> @EXPORT was used for exporting symbol (methods or variables) by default.
>> When you say,
>> use base 'Exporter';
>> our @EXPORT = qw/&mysub/;
>> ..
>> then mysub() would be exported into caller's name space defaultly.
> 
> Would that also work using:
> 
> our @EXPORT = qw/mysub/;   ?
> 

'&' is not needed here. qw/mysub/ works fine.

-- 
http://home.arcor.de/jeffpang/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About