WWW::Shorten::UserAgent(3pm)

WWW::Shorten::UserAgent3pm

Lwp::useragent subclass for www::shorten modules.

Usage

  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;
  };

Overview

Subclass 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.

Methods

get

Makes an HTTP GET request and throws an exception on error.

post

Makes an HTTP POST request and throws an exception on error.

Releases

7 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7
  2. 8
  3. 9–10
  4. 11
  5. 12–13

Author

Dave Cross <[email protected]>

From libwww-shorten-perl 3.094-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.