WWW::S...erAgent(3pm)

πŸ“¦
version 3.094 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– WWW::Shorten::UserAgent πŸ’–

okay bestie, gather round β€” this is the manual for WWW::Shorten::UserAgent, which lives in the Perl world as a 3pm man page. It's an LWP::UserAgent subclass made specifically for WWW::Shorten modules. ✨


✨ NAME ✨

WWW::Shorten::UserAgent β€” it's an LWP::UserAgent subclass, but make it specifically for WWW::Shorten modules. πŸŽ€


🌸 SYNOPSIS 🌸

Here's the vibe, copy it exactly, no cap:

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically: it's a subclass of LWP::UserAgent, and it acts exactly like its superclass... with one teeny tiny glow-up. πŸ’… The difference? If the get or post method comes back with an error, it throws an exception instead of just quietly handing you a sad little error response. It's giving "we don't do silent failures here."

Want the full tea on everything it inherits? Go read LWP::UserAgent for the complete documentation. πŸ‘‘


⭐ METHODS ⭐

get

Makes an HTTP GET request. And if there's an error? Exception thrown. Periodt. 🚨

post

Makes an HTTP POST request. Same energy: if there's an error, it throws an exception. πŸ’₯


πŸ‘‘ AUTHOR πŸ‘‘

Dave Cross <dave@mag-sol.com> β€” the icon who made this happen. 🫢


Copyright (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. Slay, go forth, remix it. ✨

This program is distributed in the hope that it will be useful, but without any warranty β€” no warranty of merchantability, no fitness for a particular purpose, none of that. It's the honor system, bestie. 😭


πŸ“ SEE ALSO πŸ“

  • WWW::Shorten β€” go look, iykyk 🌸

And that's the whole page, angel. πŸ’– This one's from the Perl v5.36.0 era, dated 2022-11-19, and yeah the man page header is technically abbreviated as WWW::S...erAgent(3pm) β€” they really did that with the ellipsis. πŸ’€ Anyway, hope this helped, go shorten some URLs responsibly. Mwah. 🧚✨