[. note: i sent this earlier, then realized that i sent it from an
unsubscribed address. i'm resending because i can't remember if
unregistered messages are /dev/nulled or admined in ]
I'm not submitting this as a patch, as I don't know how to properly
word this.
It's pretty much a variation of the following issue, but has to do
with class inheritance
http://perl.apache.org/docs/2.0/api/Apache2/
Reload.html#toc_Problems_with_Scripts_Running_with_Registry_Handlers_tha
t_Cache_the_Code
if you subclass a module to override a few methods, and then decide
to remove a subclassed method (to call off the method in the parent
class instead), you will raise an error instead of calling the parent
method.
if you do a restart, everything works as expected.
to note - this happens in mod_perl handlers -- ( i didn't test under
registry, i'd imagine its the same )
case:
==============
package MyUtils;
sub color { "white" }
1;
package MyUtils::Customized;
sub color { "red" }
1;
sub handler{
my $object = My::Utils::Customized->new();
$r->print( "The color is " . $object->color() )
}
================
returns :
"The color is red"
Now we change My::Utils::Customized;
- sub color { "red" }
And we see:
"Not a code reference at xxxxx "
Restarting Apache we will see as we expect
"The color is white"
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
unsubscribed address. i'm resending because i can't remember if
unregistered messages are /dev/nulled or admined in ]
I'm not submitting this as a patch, as I don't know how to properly
word this.
It's pretty much a variation of the following issue, but has to do
with class inheritance
http://perl.apache.org/docs/2.0/api/Apache2/
Reload.html#toc_Problems_with_Scripts_Running_with_Registry_Handlers_tha
t_Cache_the_Code
if you subclass a module to override a few methods, and then decide
to remove a subclassed method (to call off the method in the parent
class instead), you will raise an error instead of calling the parent
method.
if you do a restart, everything works as expected.
to note - this happens in mod_perl handlers -- ( i didn't test under
registry, i'd imagine its the same )
case:
==============
package MyUtils;
sub color { "white" }
1;
package MyUtils::Customized;
sub color { "red" }
1;
sub handler{
my $object = My::Utils::Customized->new();
$r->print( "The color is " . $object->color() )
}
================
returns :
"The color is red"
Now we change My::Utils::Customized;
- sub color { "red" }
And we see:
"Not a code reference at xxxxx "
Restarting Apache we will see as we expect
"The color is white"
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org