Re: re-factoring 'print' for $r

2007-12-22 Thread adam . prime
Quoting Perrin Harkins <[EMAIL PROTECTED]>: On Dec 22, 2007 5:21 PM, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: On Dec 22, 2007, at 4:47 PM, Perrin Harkins wrote: > By the way, if you just call print() normally it should all be grabbed > by mod_perl anyway. Is there some reason you need to ca

Re: re-factoring 'print' for $r

2007-12-22 Thread Perrin Harkins
On Dec 22, 2007 5:21 PM, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: > On Dec 22, 2007, at 4:47 PM, Perrin Harkins wrote: > > By the way, if you just call print() normally it should all be grabbed > > by mod_perl anyway. Is there some reason you need to call $r->print() > > instead? > > I thought

Re: re-factoring 'print' for $r

2007-12-22 Thread Jonathan Vanasco
On Dec 22, 2007, at 4:47 PM, Perrin Harkins wrote: By the way, if you just call print() normally it should all be grabbed by mod_perl anyway. Is there some reason you need to call $r->print() instead? I thought it only does that if you bind STDOUT the right way on compile time, otherwise it

Re: re-factoring 'print' for $r

2007-12-22 Thread Perrin Harkins
On Dec 22, 2007 4:40 PM, Will Fould <[EMAIL PROTECTED]> wrote: > "Global $r object is not available. Set:\n\tPerlOptions +GlobalRequest\nin > httpd.conf" And did you try what it says, i.e. setting PerlOptions +GlobalRequest? By the way, if you just call print() normally it should all be grabbed

Re: re-factoring 'print' for $r

2007-12-22 Thread Will Fould
Thanks Colin, When I try that within a package and just use: $r->print( "Hello"); I still get: "Global $r object is not available. Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf" But, I do get the correct response when I use $mnh::r->print( "Hello"); FYI - package mhn uses use

Re: re-factoring 'print' for $r

2007-12-22 Thread Colin Wetherbee
Will Fould wrote: Is this a reasonable approach? Is it typical to refer to the request object by package name rather than try to painfully re-factor all packages and subs to accept $r as a passed reference? I don't know if this will help your re-factoring, but you should note you can always g

re-factoring 'print' for $r

2007-12-22 Thread Will Fould
Greeting: I've got a style-related question: We have dozens of application packages running neatly under MP2 but that all still use 'print' and also call other packages to print needed headers, etc. I've created a single handler package (called 'mnh') that now answers all requests using the reque

Re: Find the values of Apache2::Const

2007-12-22 Thread Boysenberry Payne
When you print Apache2::Const::OK do you get 200? I'm including it using: use Apache2::Const -compile => qw( OK REDIRECT FORBIDDEN REMOTE_DOUBLE_REV ); I get 0. I get the correct codes for others like FORBIDDEN, etc. Go figure... I think what I should have used was HTTP_OK, that seems t

Re: Find the values of Apache2::Const

2007-12-22 Thread Colin Wetherbee
Adam Prime wrote: Boysenberry Payne wrote: I only ask because I tried a $r->status(Apache2::Const::OK) and got a 500 returned in the header even though my handler returned with Apache::Const::OK also... To avoid the 500 header I had to do $r->status(200); I imagine the status code isn't going

Re: Find the values of Apache2::Const

2007-12-22 Thread Adam Prime
Boysenberry Payne wrote: I only ask because I tried a $r->status(Apache2::Const::OK) and got a 500 returned in the header even though my handler returned with Apache::Const::OK also... To avoid the 500 header I had to do $r->status(200); I imagine the status code isn't going to change too so

Re: Find the values of Apache2::Const

2007-12-22 Thread Colin Wetherbee
Boysenberry Payne wrote: I only ask because I tried a $r->status(Apache2::Const::OK) and got a 500 returned in the header even though my handler returned with Apache::Const::OK also... To avoid the 500 header I had to do $r->status(200); I imagine the status code isn't going to change too soo

Re: Find the values of Apache2::Const

2007-12-22 Thread Boysenberry Payne
I only ask because I tried a $r->status(Apache2::Const::OK) and got a 500 returned in the header even though my handler returned with Apache::Const::OK also... To avoid the 500 header I had to do $r->status(200); I imagine the status code isn't going to change too soon, so I ought to be oka

Re: Find the values of Apache2::Const

2007-12-22 Thread Colin Wetherbee
Boysenberry Payne wrote: I found that $r->status() required something other than Apache2::Const in one of my modules and it got me wondering what the Constant values actually were. Now I could go through and print each one I suppose, but I thought looking at them in Apache2::Const.pm would be be

Find the values of Apache2::Const

2007-12-22 Thread Boysenberry Payne
I found that $r->status() required something other than Apache2::Const in one of my modules and it got me wondering what the Constant values actually were. Now I could go through and print each one I suppose, but I thought looking at them in Apache2::Const.pm would be better, but the package s

Re: RELEASE CANDIDATE] mod_perl-1.31 RC1

2007-12-22 Thread Andreas J. Koenig
> On Sat, 22 Dec 2007 13:52:26 +0100, [EMAIL PROTECTED] (Andreas J. Koenig) > said: > On Fri, 21 Dec 2007 23:36:53 -0800, "Philippe M. Chiasson" <[EMAIL > PROTECTED]> said: >> http://www.apache.org/~gozer/mp1/mod_perl-1.31-rc1.tar.gz > The apache Configure on my box sets my L

Re: RELEASE CANDIDATE] mod_perl-1.31 RC1

2007-12-22 Thread Andreas J. Koenig
> On Fri, 21 Dec 2007 23:36:53 -0800, "Philippe M. Chiasson" <[EMAIL > PROTECTED]> said: > http://www.apache.org/~gozer/mp1/mod_perl-1.31-rc1.tar.gz Wow, what a fast release, thanks! But sorry, nope, it doesn't work on my linux box. The apache Configure on my box sets my LIBEXT to "a