SteveHay at planit
Mar 30, 2011, 4:45 AM
The attached test.pl (with the attached ModuleOne.pm and ModuleTwo.pm)
[PATCH] Suppress prototype mismatch & subroutine redefined warnings from Apache2::Reload
produces two warnings when reloaded following a
ModPerl::Util::unload_package() call as per Apache2::Reload - one about
a prototype mismatch for a function imported by the reloaded module, and
one about a subroutine redefinition for a function defined by the
Prototype mismatch: sub ModuleOne::FunctionTwo: none vs ($) at
C:/perl5/lib/Exporter.pm line 64.
at ModuleOne.pm line 4
Subroutine FunctionOne redefined at ModuleOne.pm line 5.
I believe this happens because the entries for the symbols that have
been undef'ed are still left in the symbol table stash. Removing those
entries from the stash after undef'ing them (as in the attached
reload.patch) gets rid of the warnings which are otherwise filling up my
Does anyone know of some reason why this is not being done?
If not then I'll commit this patch soon...