stas2002/06/30 22:15:28
Modified:src/modules/perl modperl_util.c
t/response/TestAPI module.pm
Log:
modperl_perl_module_loaded should return FALSE when the argument is
+ add a sub-test to cover this case
Revision ChangesPath
1.48 +1 -1 modperl-2.0/src/modules/perl/modperl_util.c
Index: modperl_util.c
===
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- modperl_util.c21 Jun 2002 00:44:24 - 1.47
+++ modperl_util.c1 Jul 2002 05:15:28 - 1.48
-602,7 +602,7
MP_INLINE int modperl_perl_module_loaded(pTHX_ const char *name)
{
-return gv_stashpv(name, FALSE) ? 1 : 0;
+return (*name gv_stashpv(name, FALSE)) ? 1 : 0;
}
/* same as Symbol::gensym() */
1.8 +4 -1 modperl-2.0/t/response/TestAPI/module.pm
Index: module.pm
===
RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- module.pm 19 May 2002 19:10:45 - 1.7
+++ module.pm 1 Jul 2002 05:15:28 - 1.8
-18,7 +18,7
my $cfg = Apache::Test::config();
-plan $r, tests = 13;
+plan $r, tests = 14;
my $top_module = Apache::Module-top_module;
-91,6 +91,9
#bogus
ok t_cmp(0, Apache::Module::loaded('Apache__Module_foo.foo'),
Apache::Module::loaded('Apache__Module_foo.foo'));
+
+ok t_cmp(0, Apache::Module::loaded(''),
+ Apache::Module::loaded(''));
Apache::OK;
}