On Wednesday 20 July 2011 06:27:37 Gurunandan Bhat wrote:
I want to find the Browser string something that is available with $ENV{HTTP_USER_AGENT} when I run a Da*ncer app with teh default backend. However when I run the app with plackup (plackup -s Starman app.pl) $ENV{HTTP_USER_AGENT} is undefined.
You're better off using request->user_agent rather than poking around in %ENV.
Is there a way I can get to this value that does not depend on how I run the Dancer application?
Please try the above first. If you find that request->user_agent isn't getting you the user agent when run via plackup, something odd is happening; supplying a dump of request->env may be helpful. -- David Precious ("bigpresh") http://www.preshweb.co.uk/ "Programming is like sex. One mistake and you have to support it for the rest of your life". (Michael Sinz)