A way to overload in _Local.pm

I was noticing on the wiki page
That people kept pointing out that changes in the
_Local overrides would replace the original subroutine.
There is a way to leave the old call available for
calling from the new call, which I updated on the wiki,
I thought I would post it here as well in case it helps

Basically you can alias the old routine to a new name, then
replace the old name, allowing your to call the old from the
new, here is an example.

*_Load = &Load;
*Load = sub { print STDERR “Overriding Load\n”; &_Load };

When Load is called it will print, then call the old Load, now at
_Load, with the same arg list as Load got. (to change the arg list
simply change to _Load(arg1,arg2,etc).

Hope someone finds this useful, I didn’t see any other similar

 www.suave.net - Anthony Ball - ant@suave.net
    OSB - http://rivendell.suave.net/Beer

TomDOS 4.01: Floppy hat support added