In the general case, core functions can be overwritten by setting a reference in their slot in *CORE::GLOBAL at compile time. Then at runtime, when functions are called, the sub ref in that slot is used in place of the CORE:: function. (You almost never really want to do this, though.)
But, the problem here is of course that my and our aren't runtime functions. They are compile-time directives. If you are using a perl that is pre-our, and you try to map our->my (ignoring that they are very different things) you have a big problem: your fake our is called at runtime, after compile-time strict warnings are issued.
You can create an 'our()' subroutine, but it won't solve your problem: by the time it is called, it's too late. You need to intercept the source code before compile time (with a source filter, ick) or just suck it up and replace all the ours with use vars. You want that anyway, since replacing our with my is bound to break things badly, assuming the original use of our wasn't frivolous.
In reply to Re: Having one sub routine point to another
by fishbot_v2
in thread Having one sub routine point to another
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |