Perl模块编写简易说明
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 中声明的函数是默认就进入全局的。
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 中声明的函数是默认就进入全局的。