in reply to Overloading subs = weirdness in mod_perl

Just a note, you want to avoid writing functions to your symbol table at runtime. Perl's cache over @ISA is thrown away whenever you do this. This is so that any method calls take into account whatever method it was that you altered.

Good runtime code won't throw away this cache and especially not on a per-request basis.

  • Comment on Re: Overloading subs = weirdness in mod_perl

Replies are listed 'Best First'.
Re^2: Overloading subs = weirdness in mod_perl
by cfreak (Chaplain) on Nov 16, 2004 at 16:53 UTC

    This is a good point, and after a lot of thought I could probably do what I want without messing with the symbol table by modifying a dispatch table. I do have dispatch tables in my handler but they are currently private. I'd have to make them global and change all the internal calls in my modules to reference them.

    Unfortunately that's not something I have time to do at the moment as I'm supposed to be done with the project this week (and even that's not looking good at the moment :) ). I'm hoping there's an easier way.