[Catalyst] Environment Variables

2008-02-27 Thread Ryan Pack
Hello all.  First time posting here.  :-)

 

I'm trying to get at $ENV{HTTP_REFERER} from my catalyst app but it
doesn't seem to be there.  In fact the only keys that exist in %ENV are
CATALYST_ENGINE and PERL5LIB.  Are the others being wiped out somehow?
Not sure if this is normal Catalyst behavior.  Thanks!

 

Ryan Pack

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Environment Variables

2008-02-27 Thread Stephen Sykes

Ashley wrote:

On Feb 27, 2008, at 2:39 PM, Ryan Pack wrote:

Hello all.  First time posting here.  J

I’m trying to get at $ENV{HTTP_REFERER} from my catalyst app but it 
doesn’t seem to be there.  In fact the only keys that exist in %ENV 
are CATALYST_ENGINE and PERL5LIB.  Are the others being wiped out 
somehow?  Not sure if this is normal Catalyst behavior.  Thanks!




That info is in $c-request-referer _when_ it's present. Generally 
you want to avoid the ENV stuff, though I believe there is a plugin to 
get at it if you really need some part of it not already exposed.


-Ashley




___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: 
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/

Dev site: http://dev.catalyst.perl.org/


Funny, I just happened to have that cpan page open - 
http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7012/lib/Catalyst/Request.pm


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Environment Variables

2008-02-27 Thread Andrew Rodland
On Wednesday 27 February 2008 04:39:22 pm Ryan Pack wrote:
 Hello all.  First time posting here.  :-)



 I'm trying to get at $ENV{HTTP_REFERER} from my catalyst app but it
 doesn't seem to be there.  In fact the only keys that exist in %ENV are
 CATALYST_ENGINE and PERL5LIB.  Are the others being wiped out somehow?
 Not sure if this is normal Catalyst behavior.  Thanks!

They're not being wiped out, they just don't exist to begin with. All those 
envvars are part of CGI, and Catalyst is not CGI. Everything you need to know 
about the incoming request should be in $c-request (alias $c-req).

Andrew

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Environment Variables

2008-02-27 Thread Ryan Pack
Excellent, thanks!

Ryan Pack


-Original Message-
From: Ashley [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 27, 2008 4:45 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Environment Variables

On Feb 27, 2008, at 2:39 PM, Ryan Pack wrote:
 Hello all.  First time posting here.  J

 I'm trying to get at $ENV{HTTP_REFERER} from my catalyst app but it  
 doesn't seem to be there.  In fact the only keys that exist in %ENV  
 are CATALYST_ENGINE and PERL5LIB.  Are the others being wiped out  
 somehow?  Not sure if this is normal Catalyst behavior.  Thanks!



That info is in $c-request-referer _when_ it's present. Generally  
you want to avoid the ENV stuff, though I believe there is a plugin  
to get at it if you really need some part of it not already exposed.

-Ashley




___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/