NAME

Net::Disqus::UserAgent - Wrapper around LWP::UserAgent or Mojo::UserAgent

VERSION

version 1.19

SYNOPSIS

# Do not use this module directly, it's full of little internal tidbits for
# Net::Disqus, this is just here as an example

use Net::Disqus::UserAgent
my $ua = Net::Disqus::UserAgent->new(%options);

OBJECT METHODS

new(%options)

Creates a new Net::Disqus::UserAgent object. This is usually done by Net::Disqus, but the options below are valid to pass to the 'ua_args' option in the constructor for Net::Disqus.

forcelwp            (optional)  When set to a true value, will always use LWP::UserAgent even if Mojo::UserAgent is available
pass_content_as_is  (optional)  When set, will not check to see whether a JSON response was returned, and will not attempt any decoding, but will return content as-is.

USER AGENT AUTO DETECTION

If you don't force LWP, Net::Disqus::UserAgent will try in order:

Mojo::UserAgent
LWP::UserAgent

LWP::UserAgent is a requirement for Net::Disqus to be installed, so at the very least you will always have that. This behaviour was introduced for the Mojolicious::Plugin::Disqus plugin, to make sure that we always use the best user agent for a given job.

AUTHOR

Ben van Staveren, <madcat at cpan.org>

SEE ALSO

Net::Disqus

LICENSE AND COPYRIGHT

Copyright 2011 Ben van Staveren.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.