2009年9月6日星期日

[PerlChina] 好久没摸Perl的语法了,这个语法把我给难倒了

好久没模Perl的语法了。
在看attributes的文档的时候一直出现这个语法,
比较郁闷。
哪位提点一下:

           use attributes ();
           my ($x,@y,%z);
           attributes::->import(__PACKAGE__, \$x, 'Bent');
           attributes::->import(__PACKAGE__, \@y, 'Bent');
           attributes::->import(__PACKAGE__, \%z, 'Bent');
           ($x,@y,%z) = 1;


第一个地方:
attributes::这个写法是省略了什么来着?
第二个地方:
import
我记得是在use的时候自动的调用module的import方法是不是?(例如module require Exporter), 这样就有了一个缺省的import方法
但是问题是attributes哪儿定义了这个方法呢?

请各位指点。

谢谢

Mike.G

没有评论: