On Wed, Nov 01, 2000 at 12:10:48PM -0800, "Randy J. Ray" <[EMAIL PROTECTED]> wrote:
>   >> HV.
> 
> Unfortunately, I *need* the ability to have both:
> 
>       $obj->method()
> 
> and
> 
>       $obj->{KEY}  # Routed through __PACKAGE__::FETCH

In PApp::DataRef (in cvs on papp.sourceforge.net) I do just this using a
proxy class that proxies (and caches) method calls. It works fine, works with
the devel versions and allows me to use both $obj->{KEY} (calling FETCH) and
$obj->method (with the obvious outcome).

In short, it is almost always possible to not use self-ties whiel retaining
their benefits.

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       [EMAIL PROTECTED] |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

Reply via email to