in reply to Overriding CORE::GLOBAL::bless

> I've been staring at my track_blessings routine, and I can't see a reason why this override is not happening.
That's because you cannot override built-in functions
during runtime - when perl is _compiling_ this line:

bless $foo, "Bar";

it decides what op code to generate (in that case what function to
invoke). This happens at compile time. After that, when
you call your track_blessings() it is too late - the
calling of CORE::bless is already compilied and hardcoded
in the syntax opcode tree.

Replies are listed 'Best First'.
Re^2: Overriding CORE::GLOBAL::bless
by rinceWind (Monsignor) on Jan 31, 2006 at 15:20 UTC

    Yup, that's what I found. I didn't post my conclusion here, but to my use.perl journal.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)