You've not actually stated what you want to override 'use' for. If you are wanting to intercept use (and require), there is another way to do this.
Perl 5.8.x: If you insert a CODEREF into @INC (unshift, push or splice), the sub gets invoked magically, and can do its own work to provide the module. See perldoc -f require. To intercept 'use', you need to do this in a BEGIN block at the top of your main script.
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
In reply to Re: Overriding 'use'?
by rinceWind
in thread Overriding 'use'?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |