Perl: January 2008 Archives

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

October 2008

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Friends

Recent Posts

Archives

Powered by Movable Type