The problem seems to be as following: Apache::Status somehow autovivifies Apache::PerlSections stash, while Apache/PerlSections.pm wasn't loaded yet. That's why preloading Apache::PerlSections solves the problem. Our code does not attempt to load packages whose stashes exist, which is obviously wrong. I'll post a patch soonish. I think instead of checking for the stash, we need to check %INC.
[...]
I think it at least gives users more control, rather than having obscure problems when an autovivified stash will prevent the package loading. Like in the case posted by Enrico.
Or may be we should do the following:
If the package is not loaded (not in %INC), try to load it, but don't bail out if it fails (like in the case with Unloaded). Next try to lookup the stash, if it's found (which should be the case with Unloaded, since Loaded will load it) , then move on, and only if the stash is not found bail out with the loading failure error?
Sounds to me like a pretty good way to do what the user would expects ;-) But I wonder, how exactly does Perl do this internally when I do "use Module", and could we not reuse that ?
It only checks %INC.
perl -le '$Foo::Bar::x = 1; require Foo::Bar' Can't locate Foo/Bar.pm in @INC
We could do the same, but then we will have to drop the magic-behind-the-scene-loading of Foo::Bar when Foo::Bar::handler is configured in httpd.conf. Currently we require to preload the module explicitly only if a different from ::handler sub is used. (And a few other cases, like filters)
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
