On Sun, Feb 29, 2004 at 01:44:47PM -0500, Aaron Sherman wrote:
: On Fri, 2004-02-27 at 21:57, Luke Palmer wrote:
:
: > method bar_attr() will get { $.bar_attr }
: > will set { $.bar_attr = $_ }
:
: I'm confused by this in only one way... since method bar_attr and the
: accessor bar_attr have the same name, how do I write an accessor that
: recurses? Does C<.bar_attr> call my method, and not the accessor, or is
: there some other way to do that?
Within the class you can always get at the attribute via $.bar_attr.
If you call the accessor, it's always virtual, which means it might
be calling out to a derived class's wrapper of the same name. That
method might end up deferring back to your method, of course. Or did
you mean something else by "recurse"?
Larry