On Tue, Feb 20, 2001 at 01:49:45AM -0500, [EMAIL PROTECTED] wrote:
> On Tue, Feb 20, 2001 at 02:14:52AM +0000, Simon Cozens wrote:
> > > Yes. And the modules on CPAN that already do this are interesting too.
> >
> > Oh, bother. Oh well, I've got builtinify (which was actually the point of the
> > exercise) and they haven't, so I'm happy. :)
>
> Something like Function::Override then?
Sort of. What I really wanted to do was to be able to say
sub foo { ... }
builtinify(foo);
package bar;
foo(); # Refers to main::foo
package baz;
foo(); # Refers to main::foo
(this is so that the forthcoming Safety::First module can produce exported
functions available throughout the program) which is easily done if you mess
with UNIVERSAL::AUTOLOAD, but what if the user has their own
UNIVERSAL::AUTOLOAD? You need to make sure your version runs first, optionally
passing on control to theirs, which you can to be adding a pre-hook. So I had
to implement pre-hooks. :)
> Want to merge implementations?
I'm open to offers. Take a look at S::V and tell me what you think.
--
Jenkinson's Law:
It won't work.