any reason for not enabling warnings in compat? I've been burned on this
one, when calling Apache::module() instead of Apache->module() and it
was happily passing undef, making it '', and Apache::Module::loaded was
happily returning 1.
so this adds an extra level of protection. Of course
Apache::Module::loaded needs to be fixed as well.
Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.61
diff -u -r1.61 compat.pm
--- lib/Apache/compat.pm 4 Jun 2002 12:40:53 -0000 1.61
+++ lib/Apache/compat.pm 26 Jun 2002 16:11:03 -0000
@@ -1,6 +1,7 @@
package Apache::compat;
use strict;
+use warnings FATAL => 'all';
#1.xx compat layer
#some of this will stay as-is
@@ -92,6 +93,8 @@
sub module {
require Apache::Module;
+ die "the module name must be the second argument, ",
+ " e.g. Apache->module(\$module_name)" if @_ != 2;
return Apache::Module::loaded($_[1]);
}
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]