On Fri, 2003-12-05 at 20:46, Stas Bekman wrote:
> Stas Bekman wrote:
> > Stas Bekman wrote:
> >
> >> Stas Bekman wrote:
> >> [...]
> >>
> >>> 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 ?
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
--
--------------------------------------------------------------------------------
Philippe M. Chiasson /gozer\@(cpan|ectoplasm)\.org/ 88C3A5A5 (122FF51B/C634E37B)
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5
Q: It is impossible to make anything foolproof because fools are so ingenious.
perl -e'$$=\${gozer};{$_=unpack(P7,pack(L,$$));/^JAm_pH\n$/&&print||$$++&&redo}'
|