You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jie Gao <J....@isu.usyd.edu.au> on 2005/02/14 22:26:07 UTC

[mp2]"opaque string-content tables"

Hi All,

"APR::Table allows its users to manipulate opaque string-content tables."

What does it mean by "opaque"?

Thanks,



Jie

Re: [mp2]"opaque string-content tables"

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:
> 
> 
> On Tue, 15 Feb 2005, Stas Bekman wrote:
> 
> 
>>Date: Tue, 15 Feb 2005 18:26:07 -0500
>>From: Stas Bekman <st...@stason.org>
>>To: Jie Gao <J....@isu.usyd.edu.au>
>>Cc: modperl@perl.apache.org
>>Subject: Re: [mp2]"opaque string-content tables"
>>
>>Jie Gao wrote:
>>
>>[please try to trim the irrelevant chunks from your replies :) thanks ]
>>
>>
>>>>When you will want a performance boost, you will want to switch to
>>>>libapreq2 (Apache::Request).
>>>
>>>
>>>Where is it?
>>
>>http://httpd.apache.org/apreq/
> 
> 
> Where is Apache::Request for mp2 then?

It's right there in libapreq2-2.04-dev. Please take a closer look at the 
document at the above URL.


-- 
__________________________________________________________________
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

Re: [mp2]"opaque string-content tables"

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Tue, 15 Feb 2005, Stas Bekman wrote:

> Date: Tue, 15 Feb 2005 18:26:07 -0500
> From: Stas Bekman <st...@stason.org>
> To: Jie Gao <J....@isu.usyd.edu.au>
> Cc: modperl@perl.apache.org
> Subject: Re: [mp2]"opaque string-content tables"
>
> Jie Gao wrote:
>
> [please try to trim the irrelevant chunks from your replies :) thanks ]
>
> >>When you will want a performance boost, you will want to switch to
> >>libapreq2 (Apache::Request).
> >
> >
> > Where is it?
>
> http://httpd.apache.org/apreq/

Where is Apache::Request for mp2 then?

Regards,



Jie

Re: [mp2]"opaque string-content tables"

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:

>>>>When you will want a performance boost, you will want to switch to
>>>>libapreq2 (Apache::Request).
>>>
>>>
>>>Where is it?
>>
>>http://httpd.apache.org/apreq/
> 
> 
> Thanks. I've got it over but am having trouble doing "make test":
> 
> waiting 60 seconds for server to start: .Syntax error on line 29 of
> /opt/local/src/libapreq2-2.04-dev/env/t/conf/ssl/proxyssl.conf:
> SSLProxyMachineCertificateFile: file
> '/opt/local/src/libapreq2-2.04-dev/env/t/conf/ssl/ca/asf/proxy/client_ok.pem' does not exist or is empty

Jie, the above URL gives the information about the mailing list to post to 
when having libapreq problems.


-- 
__________________________________________________________________
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

Re: [mp2]"opaque string-content tables"

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Tue, 15 Feb 2005, Stas Bekman wrote:

> Date: Tue, 15 Feb 2005 18:26:07 -0500
> From: Stas Bekman <st...@stason.org>
> To: Jie Gao <J....@isu.usyd.edu.au>
> Cc: modperl@perl.apache.org
> Subject: Re: [mp2]"opaque string-content tables"
>
> Jie Gao wrote:
>
> [please try to trim the irrelevant chunks from your replies :) thanks ]
>
> >>When you will want a performance boost, you will want to switch to
> >>libapreq2 (Apache::Request).
> >
> >
> > Where is it?
>
> http://httpd.apache.org/apreq/

Thanks. I've got it over but am having trouble doing "make test":

waiting 60 seconds for server to start: .Syntax error on line 29 of
/opt/local/src/libapreq2-2.04-dev/env/t/conf/ssl/proxyssl.conf:
SSLProxyMachineCertificateFile: file
'/opt/local/src/libapreq2-2.04-dev/env/t/conf/ssl/ca/asf/proxy/client_ok.pem' does not exist or is empty

Regards,



Jie

Re: [mp2]"opaque string-content tables"

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:

[please try to trim the irrelevant chunks from your replies :) thanks ]

>>When you will want a performance boost, you will want to switch to
>>libapreq2 (Apache::Request).
> 
> 
> Where is it?

http://httpd.apache.org/apreq/

-- 
__________________________________________________________________
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

Re: [mp2]"opaque string-content tables"

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Tue, 15 Feb 2005, Stas Bekman wrote:

> Date: Tue, 15 Feb 2005 18:12:26 -0500
> From: Stas Bekman <st...@stason.org>
> To: Jie Gao <J....@isu.usyd.edu.au>
> Cc: modperl@perl.apache.org
> Subject: Re: [mp2]"opaque string-content tables"
>
> Jie Gao wrote:
>
> >>>>What does it mean by "opaque"?
> >>
> >>
> >>
> >>On the C level that means: you can put in strings and whatever you put in
> >>your get out.
> >>
> >>On the Perl level that means that we convert any scalars into strings and
> >>store that. Any special information that was in the perl scalar is not
> >>stored. So for example if a scalar was marked as utf8, that flag is lost.
> >
> >
> > Thanks for the explanation.
>
> I've committed it.
>
> >>That explanation should probably live here:
> >>http://perl.apache.org/docs/2.0/api/APR/Table.html#Description
> >>
> >>if the way I've put it is clear, I'll add it there.
> >>
> >>
> >>>Also a related question about APR::Table:
> >>>
> >>>Does a table object contain all the name/value pairs parsed from the
> >>>request line (with arguments/query strings) and from the body of the
> >>>request (like from POST), in a situation of a POST form that has a
> >>>query string at the end of the URL?
> >>>
> >>>I know the CGI module does it well, but I do not want to use that
> >>>module for what I am doing at this time.
> >>
> >>I'm not sure I understand what you are talking about, Jie. Are we talking
> >>about something like $r->headers_in table? In which case it doesn't have
> >>any query string data, other than the unparsed one, which you should
> >>get/set via $r->args anyway. If not, please explain.
> >
> >
> > Thanks, Stas. I am now parsing both the request body and the $r->args now.
>
> When you will want a performance boost, you will want to switch to
> libapreq2 (Apache::Request).

Where is it?

Regards,


Jie

Re: [mp2]"opaque string-content tables"

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:

>>>>What does it mean by "opaque"?
>>
>>
>>
>>On the C level that means: you can put in strings and whatever you put in
>>your get out.
>>
>>On the Perl level that means that we convert any scalars into strings and
>>store that. Any special information that was in the perl scalar is not
>>stored. So for example if a scalar was marked as utf8, that flag is lost.
> 
> 
> Thanks for the explanation.

I've committed it.

>>That explanation should probably live here:
>>http://perl.apache.org/docs/2.0/api/APR/Table.html#Description
>>
>>if the way I've put it is clear, I'll add it there.
>>
>>
>>>Also a related question about APR::Table:
>>>
>>>Does a table object contain all the name/value pairs parsed from the
>>>request line (with arguments/query strings) and from the body of the
>>>request (like from POST), in a situation of a POST form that has a
>>>query string at the end of the URL?
>>>
>>>I know the CGI module does it well, but I do not want to use that
>>>module for what I am doing at this time.
>>
>>I'm not sure I understand what you are talking about, Jie. Are we talking
>>about something like $r->headers_in table? In which case it doesn't have
>>any query string data, other than the unparsed one, which you should
>>get/set via $r->args anyway. If not, please explain.
> 
> 
> Thanks, Stas. I am now parsing both the request body and the $r->args now.

When you will want a performance boost, you will want to switch to 
libapreq2 (Apache::Request).

-- 
__________________________________________________________________
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

Re: [mp2]"opaque string-content tables"

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Tue, 15 Feb 2005, Stas Bekman wrote:

> Date: Tue, 15 Feb 2005 17:52:19 -0500
> From: Stas Bekman <st...@stason.org>
> To: Jie Gao <J....@isu.usyd.edu.au>
> Cc: modperl@perl.apache.org
> Subject: Re: [mp2]"opaque string-content tables"
>
> Jie Gao wrote:
> >
> >
> > On Tue, 15 Feb 2005, Jie Gao wrote:
> >
> >
> >>Date: Tue, 15 Feb 2005 08:26:07 +1100 (EST)
> >>From: Jie Gao <J....@isu.usyd.edu.au>
> >>To: modperl@perl.apache.org
> >>Subject: [mp2]"opaque string-content tables"
> >>
> >>Hi All,
> >>
> >>"APR::Table allows its users to manipulate opaque string-content tables."
> >>
> >>What does it mean by "opaque"?
>
>
>
> On the C level that means: you can put in strings and whatever you put in
> your get out.
>
> On the Perl level that means that we convert any scalars into strings and
> store that. Any special information that was in the perl scalar is not
> stored. So for example if a scalar was marked as utf8, that flag is lost.

Thanks for the explanation.

> That explanation should probably live here:
> http://perl.apache.org/docs/2.0/api/APR/Table.html#Description
>
> if the way I've put it is clear, I'll add it there.
>
> > Also a related question about APR::Table:
> >
> > Does a table object contain all the name/value pairs parsed from the
> > request line (with arguments/query strings) and from the body of the
> > request (like from POST), in a situation of a POST form that has a
> > query string at the end of the URL?
> >
> > I know the CGI module does it well, but I do not want to use that
> > module for what I am doing at this time.
>
> I'm not sure I understand what you are talking about, Jie. Are we talking
> about something like $r->headers_in table? In which case it doesn't have
> any query string data, other than the unparsed one, which you should
> get/set via $r->args anyway. If not, please explain.

Thanks, Stas. I am now parsing both the request body and the $r->args now.

Regards,



Jie

Re: [mp2]"opaque string-content tables"

Posted by Stas Bekman <st...@stason.org>.
Jie Gao wrote:
> 
> 
> On Tue, 15 Feb 2005, Jie Gao wrote:
> 
> 
>>Date: Tue, 15 Feb 2005 08:26:07 +1100 (EST)
>>From: Jie Gao <J....@isu.usyd.edu.au>
>>To: modperl@perl.apache.org
>>Subject: [mp2]"opaque string-content tables"
>>
>>Hi All,
>>
>>"APR::Table allows its users to manipulate opaque string-content tables."
>>
>>What does it mean by "opaque"?



On the C level that means: you can put in strings and whatever you put in 
your get out.

On the Perl level that means that we convert any scalars into strings and 
store that. Any special information that was in the perl scalar is not 
stored. So for example if a scalar was marked as utf8, that flag is lost.

That explanation should probably live here:
http://perl.apache.org/docs/2.0/api/APR/Table.html#Description

if the way I've put it is clear, I'll add it there.

> Also a related question about APR::Table:
> 
> Does a table object contain all the name/value pairs parsed from the
> request line (with arguments/query strings) and from the body of the
> request (like from POST), in a situation of a POST form that has a
> query string at the end of the URL?
> 
> I know the CGI module does it well, but I do not want to use that
> module for what I am doing at this time.

I'm not sure I understand what you are talking about, Jie. Are we talking 
about something like $r->headers_in table? In which case it doesn't have 
any query string data, other than the unparsed one, which you should 
get/set via $r->args anyway. If not, please explain.

-- 
__________________________________________________________________
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

Re: [mp2]"opaque string-content tables"

Posted by Jie Gao <J....@isu.usyd.edu.au>.


On Tue, 15 Feb 2005, Jie Gao wrote:

> Date: Tue, 15 Feb 2005 08:26:07 +1100 (EST)
> From: Jie Gao <J....@isu.usyd.edu.au>
> To: modperl@perl.apache.org
> Subject: [mp2]"opaque string-content tables"
>
> Hi All,
>
> "APR::Table allows its users to manipulate opaque string-content tables."
>
> What does it mean by "opaque"?

Also a related question about APR::Table:

Does a table object contain all the name/value pairs parsed from the
request line (with arguments/query strings) and from the body of the
request (like from POST), in a situation of a POST form that has a
query string at the end of the URL?

I know the CGI module does it well, but I do not want to use that
module for what I am doing at this time.

Thanks,



Jie