On Wed, Apr 20, 2005 at 08:45:02PM +0100, Scott McWhirter wrote:
: Why would this be useful? Why should anyone care? Well, a real world 
: example would be if I wished to find out through a large codebase to 
: locate all the areas within the codebase that are calling $?OS. To do 
: this, I would simply override the $.OS accessor in the GLOBAL class to 
: provide logging.

Oh, I was also going to point out that a simple .wrap is probably
what you want there, rather than screwing around with overrides that
depend on clobbering the class or on type changes getting propagated
to existing variables.

Of course, a .wrap could be construed as clobbering the class, but if
you don't want to change the underlying functionality, it's a lot
cleaner than replacing the method in question.

Larry

Reply via email to