On Thu, Jan 20, 2011 at 2:28 PM, chromatic <chromatic@wgz.org> wrote: > On Thursday 20 January 2011 at 10:32, Zefram wrote: > > It also seems very unwise for the core to take the keyword "method" at > > this stage. We have several CPAN modules supplying "method" keywords > > with various semantics, it's an unresolved area. > > To my knowledge, none of them import 'method' from feature.pm. > If you can write the following to define a class, no problem. use 5.016; use Something::Which::Provides::Method; If you have to write the following to define a class using another module, maybe "method" is not the best choice of keyword. use 5.016; no feature 'method'; use Something::Which::Provides::Method; > > As something to go in the core, I do not approve of this shortcut. > > You should definitely build the optree rather than stuff source. > > That means: > > * grabbing the optree *already generated* for the body of the sub > * ... > Why can't the parser handle it when generating the optree in the first place? The parser knows that the block will be a method body before the block is parsed. - EricThread Previous | Thread Next