in reply to Attribute::Handler's behaviors with use vs require
You are using attributes to replace a subroutine with a wrapper. If you compile code that calls the subroutine, then Perl optimizes the looking up of the code to call at the time the code is compiled and so that code doesn't notice when you replace the symbol table entry with your wrapper.
So you need to replace the sub with the wrapper before you compile code that will call the sub.
- tye
|
|---|