At 12:59 PM +0000 3/28/02, Piers Cawley wrote: >Wouldn't it be nice if you could do: > >class Foo { > ... > > &{intern('{}')} := method ($self: $key) is lvalue { > ... > } >} > >So, later, you could do: > >$obj = Foo.new; > >$obj{something} = $something_else; > >ie, overriding hash lookups, array lookups, whatever. (I'm using a >Lispish 'intern' here to return a symbol from a string by the way, I >doubt it's a good 'real' syntax, but I'm not at all keen on C<sub '{}' >{...}>
Just have a ASSIGNHASH (or ASSIGNARRAY) sub and we'll probably do this for you... -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk