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

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

πŸ’– WWW::S...TinyURL(3pm) πŸ’–

okay bestie, so this is the manual page for WWW::Shorten::TinyURL β€” it's a whole Perl module that's literally just a glow-up pass for your URLs ✨. It's the Perl interface to <https://tinyurl.com>, and no cap, it does exactly one job and it does it beautifully. πŸŽ€


✨ SYNOPSIS ✨

here's the vibe, copy-paste ready:

use strict;
use warnings;

use WWW::Shorten::TinyURL;
use WWW::Shorten 'TinyURL';

my $short_url = makeashorterlink('https://www.foo.com/some/long/url');
my $long_url  = makealongerlink($short_url);

like... look at that. short in, long out. long in, short out. the circle of life fr fr 🌈


🌸 DESCRIPTION 🌸

A Perl interface to the web site <https://tinyurl.com>. The service simply maintains a database of long URLs, each of which has a unique identifier.

so basically: you feed it a monster URL, it hands you back a lil baby one, and behind the scenes there's a database keeping receipts of which long URL belongs to which identifier. that's the whole tea. β˜•πŸ‘‘

πŸ¦‹ Functions

The function makeashorterlink will call the <https://TinyURL.com> web site passing it your long URL and will return the shorter version.

you give it your tragic 400-character URL, it goes and talks to the site, and comes back with something cute and postable. slay. πŸ’…

The function makealongerlink does the reverse. makealongerlink will accept as an argument either the full URL or just the identifier.

reverse uno card πŸƒ β€” hand it either the whole short URL or just the identifier bit, and it'll give you the long one back.

If anything goes wrong, then either function will return undef.

⚠️ bestie please, always check for undef before you go using the result. if something breaks, you don't get an error message, you just get undef and then your code does something cursed. check your return value, it's giving self-care. 😭

πŸ‘‘ EXPORT

makeashorterlink, makealongerlink

both functions get exported, no extra setup needed. we love a generous module. πŸ’œ


πŸŽ€ SUPPORT, LICENSE, THANKS and SUCH πŸŽ€

See the main WWW::Shorten docs.

(translation: the boring legal + help-me stuff lives in the parent module's docs, go peek there 🌸)


πŸ’« AUTHOR πŸ’«

Iain Truskett <spoon@cpan.org>

shoutout to Iain, the icon who wrote this πŸ‘‘βœ¨


πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page bestie, you're fully caught up. this was WWW::S...TinyURL(3pm) from perl v5.36.0, dated 2022-11-19 β€” go forth and shorten responsibly, mwah πŸ’–πŸ¦‹πŸ’