David Dick wrote:
this is probably evil, and apologies to those who have seen suspiciously familiar code before, but is this possible?

package MyPrefix::Apache::Registry;
use strict;

BEGIN {
use Apache::Registry();
}

sub handler {
delete $INC{'Site.pm'};
# mess with @INC
require Site;
return (Apache::Registry::handler(@_));
}
a simpler way is to do:

  do "Site.pm";

though you forgot to call the import, when removing use, so you do:

  do "Site.pm";
  Site->import("whatever");

and if you use:

   use warnings;

you probably want to add:

  no warnings 'redefine';

END { }

1;

that would allow you to keep perl resident, keep the cgi-scrip resident and simply reload a small? configuation perl module each time.
(i think?) :)
indeed. This is discussed here:
http://perl.apache.org/docs/1.0/guide/porting.html#Name_collisions_with_Modules_and_libs

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to