Skip navigation

package YourModule;
# gives you Exporter's import() method directly
use Exporter 'import';
@EXPORT_OK = qw(munge frobnicate);
@EXPORT = qw(sth);

EXPORT_OK 中声明的函数需要在use YourModule后加入qw//来申请进入全局。而EXPORT 中声明的函数是默认就进入全局的。

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>