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

Mike.G hylinux at gmail.com
Sun Sep 6 22:33:07 PDT 2009


没人知道么?

Mike.G


2009/9/7 Mike.G <hylinux at gmail.com>

> 好久没模Perl的语法了。
> 在看attributes的文档的时候一直出现这个语法,比较郁闷。
> 哪位提点一下:
>
>            use attributes ();
>            my ($x, at y,%z);
>            attributes::->import(__PACKAGE__, \$x, 'Bent');
>            attributes::->import(__PACKAGE__, \@y, 'Bent');
>            attributes::->import(__PACKAGE__, \%z, 'Bent');
>            ($x, at y,%z) = 1;
>
>
> 第一个地方:
> attributes::这个写法是省略了什么来着?
> 第二个地方:
> import
> 我记得是在use的时候自动的调用module的import方法是不是?(例如module require Exporter),
> 这样就有了一个缺省的import方法
> 但是问题是attributes哪儿定义了这个方法呢?
>
> 请各位指点。
>
> 谢谢
>
> Mike.G
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/china-pm/attachments/20090907/c724a3c5/attachment.html>


More information about the China-pm mailing list