Re: where to find request object in mod_perl2

2003-08-29 Thread Stas Bekman
Igor Ivoilov wrote:
Hello all,

I have perl programs running under Apache::Registry.
Now I need to switch to mod_perl2 and can not find request object.
I used to get as
$r = Apache-request;
But this does not work under mod_perl2.
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache_E_gt_request_

__
Stas BekmanJAm_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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: where to find request object in mod_perl2

2003-08-29 Thread Paul G. Weiss
The doc you reference says that Apache-request should be avoided because 
it is expensive.  But does it in fact work?

-Paul

On Fri, 29 Aug 2003 10:17:57 -0700, Stas Bekman [EMAIL PROTECTED] wrote:

Igor Ivoilov wrote:
Hello all,

I have perl programs running under Apache::Registry.
Now I need to switch to mod_perl2 and can not find request object.
I used to get as
$r = Apache-request;
But this does not work under mod_perl2.
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache_E_gt_request_

__
Stas BekmanJAm_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






--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: where to find request object in mod_perl2

2003-08-29 Thread Stas Bekman
Paul G. Weiss wrote:
The doc you reference says that Apache-request should be avoided 
because it is expensive.  But does it in fact work?
Yes.  Have you actually read it? That section also explains when it's available.

Igor said: this does not work under mod_perl2, without showing any error 
messages or explaining what kind of problem he has.

On Fri, 29 Aug 2003 10:17:57 -0700, Stas Bekman [EMAIL PROTECTED] wrote:

Igor Ivoilov wrote:

Hello all,

I have perl programs running under Apache::Registry.
Now I need to switch to mod_perl2 and can not find request object.
I used to get as
$r = Apache-request;
But this does not work under mod_perl2.


http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache_E_gt_request_ 

__
Stas BekmanJAm_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





--

__
Stas BekmanJAm_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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


RE: where to find request object in mod_perl2

2003-08-29 Thread Igor Ivoilov
Sorry for not pointing out all details

config file
FilesMatch \.pl$
SetHandler perl-script
PerlHandler ModPerl::Registry::handler
PerlOptions +ParseHeaders
AddType text/html .pl
Options +ExecCGI
/FilesMatch

my $r = Apache-request;
gives Can't locate object method request via package Apache at 

while
my $r = shift; 
gives an object of type 'Apache::RequestRec'

Can not find how to reach header_in() from this point

 -Original Message-
 From: Stas Bekman [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 29, 2003 8:46 PM
 To: Paul G. Weiss
 Cc: [EMAIL PROTECTED]
 Subject: Re: where to find request object in mod_perl2
 
 
 Paul G. Weiss wrote:
  The doc you reference says that Apache-request should be avoided 
  because it is expensive.  But does it in fact work?
 
 Yes.  Have you actually read it? That section also explains 
 when it's available.
 
 Igor said: this does not work under mod_perl2, without 
 showing any error 
 messages or explaining what kind of problem he has.
 
  On Fri, 29 Aug 2003 10:17:57 -0700, Stas Bekman 
 [EMAIL PROTECTED] wrote:
  
  Igor Ivoilov wrote:
 
  Hello all,
 
  I have perl programs running under Apache::Registry.
  Now I need to switch to mod_perl2 and can not find request object.
 
  I used to get as
  $r = Apache-request;
 
  But this does not work under mod_perl2.
 
 
  
 http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apa
 che_E_gt_request_ 
 
 
  __
  Stas BekmanJAm_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
 
 
 
  
 
 
 -- 
 
 
 __
 Stas BekmanJAm_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
 
 
 
 -- 
 Reporting bugs: http://perl.apache.org/bugs/
 Mail list info: http://perl.apache.org/maillist/modperl.html
 
 


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Re: where to find request object in mod_perl2

2003-08-29 Thread Stas Bekman
Igor Ivoilov wrote:
Sorry for not pointing out all details

config file
FilesMatch \.pl$
SetHandler perl-script
PerlHandler ModPerl::Registry::handler
PerlOptions +ParseHeaders
AddType text/html .pl
Options +ExecCGI
/FilesMatch
my $r = Apache-request;
gives Can't locate object method request via package Apache at 
That's much better. You need to load 'Apache::RequestUtil'

Please refer to the compatibility and porting documents which give you all the 
info that you need:
http://perl.apache.org/docs/2.0/user/porting/compat.html
http://perl.apache.org/docs/2.0/user/porting/porting.html

while
my $r = shift; 
gives an object of type 'Apache::RequestRec'
That's correct.

Can not find how to reach header_in() from this point
Again, it's in:
http://perl.apache.org/docs/2.0/user/porting/compat.html
__
Stas BekmanJAm_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


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html