On Mon, May 02, 2005 at 03:20:03PM -0700, Larry Wall wrote: : Probably does something like: : : &?BLOCK does First; # no-op if it already does First : &?BLOCK.firstlist.push(&block);
Probably shouldn't use up a normal name like "First" for that. Maybe we can just reuse the trait name as the role name &?BLOCK does FIRST; # no-op if it already does First &?BLOCK.FIRST.push(&block); In this view, whether setting a trait clobbers an existing property or merely appends to it depends on the trait handler's implementation. I'm inclining more toward the view that all these blocks are pushed onto the FIRST property at BEGIN time, but the "will first" properties are wrapped in code that prevents them from running before their variable is declared. (Or maybe the wrapper just checks to see if the variable is defined? That would disable the block when you undef the variable. That might be construed as a feature.) Larry