in reply to using Exporter to overwrite a core function
It would be nice to see some of your code, but basically you need to use the subs pragma. Here's an example:
There's a nice discussion of this in perlsub.use strict; use warnings; package Happiness; use subs 'die'; sub die { local $| = 1; print "Don't worry, be happy\n" } die "Good-bye, cruel world!\n"; warn "Suicide attempt failed\n"; CORE::die "OK, THIS time I'm outta here!\n"; __END__ Don't worry, be happy Suicide attempt failed OK, THIS time I'm outta here!
the lowliest monk
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: using Exporter to overwrite a core function
by Forsaken (Friar) on Apr 09, 2005 at 21:47 UTC | |
by tlm (Prior) on Apr 09, 2005 at 23:03 UTC | |
by Forsaken (Friar) on Apr 10, 2005 at 18:15 UTC |