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

Re: Module question

Thread Previous | Thread Next
Jeff Pang
May 17, 2007 08:22
Re: Module question
Message ID:
Robert Hicks 写道:
> Is @EXPORT_OK for those items you want to import by "name" and 
> %EXPORT_TAGS for those items you want to group like :all or :select?

Almost right.

> What is @EXPORT used for then if that is the case above?

@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.


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