I'm assuming you found this already:
http://mail-archives.apache.org/mod_mbox/perl-dev/200504.mbox/%3C4256B5F...@stason.org%3E
But I confess I've never seen that error. Maybe this documentation will help?
http://search.cpan.org/dist/Rose-DB/lib/Rose/DB/Cache.pm
If you can provide a minimal reproduction of the problem (e.g., a
small sample httpd.conf plus startup.pl) I can try to debug it. Any
other mod_perl 2 users have this problem?
-John
If you're not calling new_or_cached(), I suspect the point is moot.
>> If you can provide a minimal reproduction of the problem (e.g., a
>> small sample httpd.conf plus startup.pl) I can try to debug it. Any
>> other mod_perl 2 users have this problem?
>
> I'm trying to put this together now. The code base I inherited is
> complex and large, so I'm stripping it down to the bare minimum such
> that the issue is still reproducible. Meanwhile, can you think of
> anything specific that changed in the code between 0.747 and 0.748
> that is somehow related to mod_perl's use of anon subs?
That release was all about changes to mod_perl 2 support, but I think
it should not affect you if you're not using caching:
http://search.cpan.org/diff?from=Rose-DB-0.747&to=Rose-DB-0.748&w=1
Maybe you're using caching and don't know it?
-John
Ah, that makes sense.
> Commenting out these lines makes the problem go away! Perhaps you can
> consider having Rose::DB::Cache not load that little snippet by
> default? Seems reasonable if one is not using Rose::DB::Cache.
The trouble is, it's not known at the time the decision is being made
whether you will call new_or_cached() anywhere in your code in the
future. A better fix would be to figure out a way to check for
whatever setting it is that will cause this handler to fail later. Is
that the "PerlOptions +Parent" thing? If so, how can we check for
that programatically?
-John
Well, as a work-around, I can always check for some environment
variable (e.g., ROSE_DB_NO_MOD_PERL) and then not run the offending
code if it's set. That might suffice until/unless a minimal
reproduction can be created to pinpoint the cause. What do you think?
-John
Okay, I think I worked around it without requiring any environment
variable hacks. Try out the SVN version and let me know if it works
for you.
-John
In SVN, I added an (undocumented) environment variable on top of my
previous fix:
Set ROSE_DB_NO_CHILD_INIT_HANDLER to a true (as far as Perl is
concerned) value and let me know if that silences all of your
warnings.
-John
Look into PerlPassEnv
http://modperlbook.org/html/4-2-10-PerlSetEnv-and-PerlPassEnv.html
-John