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

Re: Module question

Thread Previous | Thread Next
From:
Jeff Pang
Date:
May 17, 2007 08:22
Subject:
Re: Module question
Message ID:
464C72F9.5040805@earthlink.net
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.

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

Thread Previous | Thread Next


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