Thanks David. request->user_agent works in both cases (with Dancer's backend as well as with plackup).
Would appreciate understanding why using %ENV for this is not a good idea.
On Wednesday 20 July 2011 06:27:37 Gurunandan Bhat wrote:> $ENV{HTTP_USER_AGENT} when I run a Da*ncer app with teh default backend.
> I want to find the Browser string something that is available with
> However when I run the app with plackup (plackup -s Starman app.pl)You're better off using request->user_agent rather than poking around in %ENV.
> $ENV{HTTP_USER_AGENT} is undefined.
Please try the above first. If you find that request->user_agent isn't
> Is there a way I can get to this value that does not depend on how I run
> the Dancer application?
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)