Sneaky. Like it.
You'd also need to check that the subroutine actually exists at INIT time, and wrap AUTOLOAD with something appropriate if it's defined.
As liz points out this won't work in mod_perl, eval and other places where the INIT phase has already occured.
I guess you could use a source filter to inline the wrapping code - but that would be really evil ;-)
In reply to Re^2: use deprecated;
by adrianh
in thread use deprecated;
by halley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |