同问一下。 Mike.G wrote: > > > ---------- Forwarded message ---------- > From: *Mike.G* <[email protected] <mailto:[email protected]>> > Date: 2009/9/7 > Subject: 好久没摸Perl的语法了,这个语法把我给难倒了 > To: [email protected] <mailto:[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 访问该论坛 -~----------~----~----~----~------~----~------~--~---
