damian45 has asked for the wisdom of the Perl Monks concerning the following question:
I have several hundred different misc cgis that I want to override CGI->new in. Basically I want to stash a ref to the original CGI::new coderef, call it, then run some routines after it finishes.
These scripts are all very different, but do use some custom libraries (e.g. use Company::CustomLib;). So I want to put the override code in CustomLib.pm.
I got my code working in the body of a cgi using the Sub::Override module. However when I move that to CustomLib.pm it doesn't override, I assume some namespace issue I don't understand.
I've been experimenting a lot with symbol tables and what not, as well as googling around still haven't stumbled arcross how to make it be overridden if it's in CustomLib.pm. I'm about ready to just hack CGI.pm but really dont' want to have to do that when I know there's some better way.
thanks for help
cheers to the all!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: over ride CGI::new from existing package
by Your Mother (Archbishop) on Jun 25, 2010 at 07:12 UTC | |
|
Re: over ride CGI::new from existing package
by Anonymous Monk on Jun 25, 2010 at 03:58 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |