in reply to aliasing subs
A simpler technique may be just to have a base sub and then wrap the other subs around it e.g
Simpler still use one of the Hook:: modules, or just take Zaxo's advice and use the ever-handy File::Spec.sub base { return "doing stuff" } sub foo { return base(). " in foo\n" } local *bar = sub { return base(). " in bar\n" }; foo(), bar(); __output__ doing stuff in foo doing stuff in bar
_________
broquaint
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: aliasing subs
by december (Pilgrim) on May 06, 2003 at 12:09 UTC | |
by edan (Curate) on May 06, 2003 at 12:27 UTC | |
by december (Pilgrim) on May 06, 2003 at 15:30 UTC | |
by jdporter (Paladin) on May 06, 2003 at 12:46 UTC |