I'll bring this up on the mod_perl dev list. I don't think we should advise people to use such a crazy construct.
The problems people encounter with ModPerl::Registry are usually not caused by inner subroutines, but rather by closures. The closures were always there, but were never noticed before in a non-persistent environment. Consider this:
my $q = CGI->new;
show_name();
sub show_name {
print $q->param('name');
}
This code will break when run in mod_perl because it forms a closure around $q, making it a private variable for the show_name() sub after compilation.
This problem can be fixed by making $q an our variable, but that's a poor programming practice, giving $q a large scope and persistence that it should not have. The correct fix is to pass the variables that the sub requires:
my $q = CGI->new;
show_name($q);
sub show_name {
my $q = shift;
print $q->param('name');
}