Perl Module 的编写

| | Comments (0) | TrackBacks (0)
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 中声明的函数是默认就进入全局的。

0 TrackBacks

Listed below are links to blogs that reference this entry: Perl Module 的编写.

TrackBack URL for this entry: http://blog.jianingy.com:4080/mt-tb.cgi/214

Leave a comment