in reply to Trapping acces to variables in-code

Yes. You rewrite the "namespace" to "trap" the access to the variables ... example
package mything; # do not variables (scalars, arrays, and hashes) . . . my $someVar = 'XYZ'; # define lvalue subs to "trap" access to vars sub someVar : lvalue { print "Ooo! I trapped you!\n"; return $someVar; } . . . 1;
Or something like that. You'll have to work out the details.

Replies are listed 'Best First'.
Re^2: Trapping acces to variables in-code
by ikegami (Patriarch) on Oct 13, 2004 at 17:57 UTC
    Unfortunately, it doesn't quite work. $mything::someVar has to become mything::someVar for the function to be called.