On Mon, 10 Mar 2003 [EMAIL PROTECTED] wrote:

> Hi -
>
> I'm getting frustrated. I'm trying to parse the
> incoming uri (url) in mod_perl 2, and I can't
> seem to be able to find documentation. For
> example, Nick gave me the following snippet
> of code last week:
>
>   my $uri = APR::URI->parse($r->pool,
>     $r->construct_url);
>   $uri->scheme('https');
>   my $new_uri = $uri->unparse;
>
> OK. Now where can a find documentation for:
>
>  * methods/members in $r?
>  * methods/members in APR?
>  * methods/members in uri?


Have you tried the pretty good (tm) search engine on the mod_perl site
itself? Note  that you can restrict your search to the 2.0 docs. For
example, searching for `APR::URI->parse' gave me one result:
http://perl.apache.org/docs/2.0/user/compat/compat.html#C_Apache__URI_E_gt_parse__r____uri___

which has exactly what I need.

Now of course it also refers me to the man page for APR::URI, which does
not (apparently) exist.

I think it may be harder for you, Beau, since you started working with
mod_perl with this beta 2.0 version, and don't have a grounding in
mod_perl from v. 1.0.

The docs work best when you know what you want to do and how to do it in
mp1, and can then find the equivalent for mp2.


> code. I wanted to examine APR, for example,
> and look what I found:
>
> package APR;
> use DynaLoader ();
> our $VERSION = '0.01';
> our @ISA = qw(DynaLoader);
> #dlopen("APR.so", RTDL_GLOBAL); so we only need
> #to link libapr.a once
> sub dl_load_flags { 0x01 }
>
> unless (defined &APR::XSLoader::BOOTSTRAP) {
> __PACKAGE__->bootstrap($VERSION);
>   *APR::XSLoader::BOOTSTRAP = sub () { 1 };
> }
> 1;
> __END__

Yep, not very enlightening if you're not a C guru.

- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>

Reply via email to