we had a strange occurrence recently. after making what seemed to be a harmless change, adding the BerkeleyDB module to one of our handlers, the apache configtest started failing with the following cryptic errors:
% /usr/local/apache/bin/httpd -t -f /tmp/httpd.conf [Thu May 3 08:45:09 2007] [error] "args_method" is not exported by the HTML::Mason::ApacheHandler module\n "mod_perl" is not exported by the HTML::Mason::ApacheHandler module\nCan't continue after import errors at /tmp/handler.pl line 5\nBEGIN failed--compilation aborted at /tmp/handler.pl line 5.\nCompilation failed in require at (eval 2) line 1.\n Syntax error on line 1 of /tmp/httpd.conf: "args_method" is not exported by the HTML::Mason::ApacheHandler module "mod_perl" is not exported by the HTML::Mason::ApacheHandler module Can't continue after import errors at /tmp/handler.pl line 5 BEGIN failed--compilation aborted at /tmp/handler.pl line 5. Compilation failed in require at (eval 2) line 1. so after some further detective work, i discovered that it wasn't actually BerkeleyDB, but its use of UNIVERSAL, and specifically this line *import = \&Exporter::import; which seems to overwrite the import method in either HTML::Mason::Exceptions or HTML::Mason::MethodMaker. so i've broken down my test case t be as simple as possible. i've got /tmp/httpd.conf that only contains PerlRequire /tmp/handler.pl and /tmp/handler.pl that only contains #!/usr/bin/perl use lib '/tmp/lib'; use UNIVERSAL; use HTML::Mason::ApacheHandler ( args_method => 'mod_perl' ); 1; and even though not completely necessary, i went as far as stripping down /tmp/lib/UNIVERSAL.pm to only contain package UNIVERSAL; use Exporter; *import = \&Exporter::import; 1; any of the following cause the configtest to return OK: 1) comment out use UNIVERSAL; in the handler.pl 2) place use UNIVERSAL; somewhere after use HTML::Mason... in the handler.pl 3) comment out *import = \&Exporter::import; in UNIVERSAL.pm on the surface there appear to be several workarounds, but i'd like to see if somebody has some insight into the root cause and a "proper" solution. basically this happened because we have multiple separate handler.pl files for various sections of our development server. so any handler.pl that is called after any other one that makes use of UNIVERSAL causes apache not to start. versions: % perl -MHTML::Mason -e 'print $HTML::Mason::VERSION."\n";' 1.26 % perl -MUNIVERSAL -e 'print $UNIVERSAL::VERSION."\n";' 1.01 % /usr/local/apache/bin/httpd -v Server version: Apache/1.3.34 (Unix) Server built: Apr 13 2006 20:18:53 and i think that mod_perl is 1.29, compiled into apache. forgive me if i have forgotten something, but i have been digging through this code for about four hours. thanks in advance for any help or suggestions. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users