in reply to How can I re-program the exists function?
I think the closest you could get would be to create your my_exists function taking a separate hashref and string as you already have, then use something like Devel::Declare or Devel::CallParser (perhaps coupled with PPI) to hook into the Perl compiler and translate this:
my_exists($hash{key})
to this during the parse/compile stage:
my_exists(\%{hash}, 'key')
It's not an easy task though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I re-program the exists function?
by Anonymous Monk on Aug 24, 2012 at 16:25 UTC | |
|
Re^2: How can I re-program the exists function?
by greengaroo (Hermit) on Aug 27, 2012 at 15:40 UTC |