|
NAMEWWW::Shorten::UserAgent - LWP::UserAgent subclass for WWW::Shorten modules. SYNOPSIS use strict;
use warnings;
use WWW::Shorten::UserAgent;
use Try::Tiny qw(try catch);
my $ua = WWW::Shorten::UserAgent->new;
my $resp = try {
$ua->get($url);
}
catch {
warn "Uh oh: $_";
return undef;
};
DESCRIPTIONSubclass of LWP::UserAgent which works the same way as the superclass except that it throws an exception if the "get" or "post" method returns an error. See LWP::UserAgent for the full documentation. METHODSgetMakes an HTTP GET request and throws an exception on error. postMakes an HTTP POST request and throws an exception on error. AUTHORDave Cross <dave@mag-sol.com> LICENSE AND COPYRIGHTCopyright (c) Magnum Solutions Ltd., 2012. All rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. SEE ALSOWWW::Shorten
|