On Wed, Oct 03, 2001 at 08:40:40PM -0700, Doug MacEachern wrote:
> On Thu, 4 Oct 2001, Philippe M . Chiasson wrote:
>
> > Can you tell me exactly why ? I started doing it the way 1.x used to do it
> > but it was pretty complicated and I thought about this method instead, that
> > sounded as good yet a lot simpler. Care to explain why we need to check %INC
> > for real ?
>
> just because it is possible for a %package:: to exist with the .pm loaded.
> but i guess we could just check the package for now and change later if
> needed. pretty sure 1.x goes through the trouble for a reason, but we can
> wait and seen if there actually is a problem which just checking the
> stash.
Okay, it sure makes sense to _really_ check in @INC, it's just quite complicated
compared to checking the stash. One question about that stuff. Why isn't there
a generic function somwehre in perl to convert Perl package name to a filename ? Or
haven't
I looked enough... Because I have the impression that simply s/::/\//g and slapping
a '.pm' at the end most definitely doesn't work on all platforms ...
> > One question remains though, if I am stuck in some bit of code that doesn't
> > get passed anything interesting as arguments, how can I cleanly get my hands
> > on the current apr_pool ?
>
> there is apr_pool_t *modperl_global_pconf_get() to get the server pool,
> and modperl_global_request_rec_get() for the current request_rec (only
> with PerlOptions +GlobalRequest). we should try to avoid using these
> globals at all costs though.
Yes, I understand why these things should be avoided ;-)
I just wonder what should be the clean way to dynamically allocate memory when
you need it, if you need it, without a handle on things like the current
request/pool...
--
+----------------------------------------------------+
| Philippe M. Chiasson <[EMAIL PROTECTED]> |
+----------------------------------------------------+
| F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5 |
+----------------------------------------------------+
gethostent not implemented : Your C library apparently
doesn't implement gethostent(), probably because if it did,
it'd feel morally obligated to return every hostname on the
Internet.
-- perldiag(1)
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl
Hacker!\n$/&&print||$$++&&redo}'
PGP signature