Viko has asked for the wisdom of the Perl Monks concerning the following question:
Hi folks,
I want to overload CGI.pm with some minor tweaks of mine. It has to have the same name (using use 'lib' or PERL5LIB to access mine first), due to the number of files I'd have to change in order to replace the original with mine. The problem is that my module has to call the original CGI.pm after it's done.
Any ideas? I've tried removing the lib path with a BEGIN block but that breaks other module imports that rely on my base lib path.
Here's some pseudo code:
use lib '/path/to/my/root/lib'; use CGI; #this one is mine, found under /path/to/my/root/lib/CGI.pm # need to find a way to 'use', or 'use base' the original CGI.pm here #... some code here to set $query_string... return CGI->new($query_string); # this Lincoln Stein's CGI.pm
Thanks in advance,
Vinny.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mucking around with module imports
by moritz (Cardinal) on Jul 20, 2010 at 13:16 UTC | |
|
Re: Mucking around with module imports
by chromatic (Archbishop) on Jul 20, 2010 at 16:06 UTC | |
|
Re: Mucking around with module imports
by Anonymous Monk on Jul 20, 2010 at 13:07 UTC | |
by Viko (Acolyte) on Jul 20, 2010 at 13:11 UTC | |
by Anonymous Monk on Jul 20, 2010 at 13:18 UTC |