Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
P is for Practical
 
PerlMonks  

Re: Need to turn off prints from module

by Mushka (Acolyte)
on Nov 18, 2010 at 17:32 UTC ( #872304=note: print w/ replies, xml ) Need Help??


in reply to Need to turn off prints from module

Thank you all again!

Ken, thanks for pointing out that your user agents have spaces instead of plusses. Im grabbing my strings from the server logs, and it looks like the user agent strings are being modified by the script that's producing these logs. Changing plusses to spaces helped greatly, but there are still occasional errors like:

Use of uninitialized value in split at /usr/local/share/perl/5.8.8/Par +se/HTTP/UserAgent.pm line 98, <FILES> line 14.
and
Version string '3.5.9-1.fc11' contains invalid data; ignoring: '-1.fc11' at /usr/local/share/perl/5.8.8/Parse/HTTP/UserAgent.pm line 210, <FILES> line 181.

However, making the plusses into spaces allowed the two other modules that i mentioned to make more sense out of the user agent strings that i was passing. And neither of them are giving me the annoying notifications :o) So i will probably end up using one of these as opposed to Parse::HTTP::UserAgent since there seems to be no easy way to shut the module up. And yes, like i said at the beginning, turning off all errors and warnings is not an option for a sensible programmer.

Thargas, thank you for bringing up a good point that user agent strings are not a science, that im never gonna get a 100% accurate result, and that the accuracy is going to drop as the time goes by. To answer your question, we want to see a statistics of which browsers our clients are using to reach our website so we could make business decisions on which browsers we should start/continue to provide support for. Luckily, our management understands that the report is going to have an approximation of what browsers are being used and they still see a value in such report. If you see a different approach to better achieve this goal i would love to hear your ideas!


Comment on Re: Need to turn off prints from module
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-04-19 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls