哦。原来是这样阿。 呵呵。 谢谢了。 我去找这本书来看看。
2009/9/7 Jedy <[email protected]> > programming perl 12.3.4中回答了你的第一个问题。 > attributes::->import和attributes->import一样,只不过它能保证不会被解析为attributes()->import > > 第二个问题没看明白,attributes.pm中定义了import方法啊。 > > 2009/9/7 Beckheng Lam <[email protected]>: > > 同问一下。 > > > > Mike.G wrote: > > > > ---------- Forwarded message ---------- > > From: Mike.G <[email protected]> > > Date: 2009/9/7 > > Subject: 好久没摸Perl的语法了,这个语法把我给难倒了 > > To: [email protected] > > > > > > 好久没模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 > > > > > > > > -- > > Perl乐事 -- http://www.perlersh.org > > 我的博客 -- http://www.perlersh.org/blog.html > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
