John Siracusa skribis 2004-04-19 14:20 (-0400): > has $.gender is rw; > (...) > This works well for a while, but then I decide to update Dog so that setting > the name also sets the gender. > $dog.name = 'Susie'; # also sets $dog.gender to 'female' > How do I write such a name() method? Do I just check the arg, set the > gender, and then return $.name as an "lvalue" or something?
IIRC, something like has $.name is rw is STORE { ... }; > If so, what happens if, some time down the road, the $.name attribute goes > away entirely? I can't return it as an lvalue now, can I? Why not? Juerd