logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

WWW::Shorten - Interface to URL shortening sites.

Author

       Iain Truskett "spoon@cpan.org"

Bugs, Requests, Comments

       Please  submit  any  issues  <https://github.com/p5-shorten/www-shorten/issues>  you  might   have.    We
       appreciate all help, suggestions, noted problems, and especially patches.

       *  If you know of a shorten service that we don't already have, make your own service and release it as a
       separate module, like WWW::Shorten::Googl or WWW::Shorten::Bitly.  Alternatively, you can let us know and
       we'll be happy to work it up for you.

Contributors

       •   Alex Page -- for the original LWP hacking on which Dave based his code.

       •   Ask Bjoern Hansen -- providing WWW::Shorten::Metamark

       •   Chase Whitener "capoeirab@cpan.org"

       •   Dave Cross dave@perlhacks.com -- Authored WWW::MakeAShorterLink on which this was based

       •   Eric Hammond -- writing WWW::Shorten::NotLong

       •   Jon and William (wjr) -- smlnk services

       •   Kazuhiro Osawa "yappo@cpan.org"

       •   Kevin Gilbertson (Gilby) -- TinyURL API information

       •   Martin Thurn -- bug fixes

       •   Matt Felsen (mattf) -- shorter function names

       •   Neil Bowers "neilb@cpan.org"

       •   PJ Goodwin -- code for WWW::Shorten::OneShortLink

       •   Shashank Tripathi "shank@shank.com" -- for providing WWW::Shorten::SnipURL

       •   Simon Batistoni -- giving the `makealongerlink` idea to Dave.

       •   Everyone else we might have missed.

       In 2004 Dave Cross took over the maintenance of this distribution following the death of Iain Truskett.

       In 2016, Chase Whitener took over the maintenance of this distribution.

Deprecation Notice

       The following shorten services have been deprecated as the endpoints no longer exist or function:

       •   WWW::Shorten::LinkToolbot

       •   WWW::Shorten::Linkz

       •   WWW::Shorten::MakeAShorterLink

       •   WWW::Shorten::Metamark

       •   WWW::Shorten::TinyClick

       •   WWW::Shorten::Tinylink

       •   WWW::Shorten::Qurl

       •   WWW::Shorten::Qwer

       When version 3.100 is released, these deprecated services will not be part of the distribution.

Description

       A Perl interface to various services that shorten URLs. These sites maintain databases of long URLs, each
       of which has a unique identifier.

Name

       WWW::Shorten - Interface to URL shortening sites.

See Also

       CGI::Shorten, WWW::Shorten::Simple

perl v5.36.0                                       2022-11-19                                  WWW::Shorten(3pm)

Shorten App

       A  very  simple program called shorten is supplied in the distribution's bin folder. This program takes a
       URL and gives you a shortened version of it.

Synopsis

         #!/usr/bin/env perl
         use strict;
         use warnings;

         use WWW::Shorten 'TinyURL'; # Recommended
         # use WWW::Shorten 'Bitly'; # or one of the others

         # Individual modules have have their own syntactic variations.
         # See the documentation for the particular module you intend to use for details

         my $url = 'https://metacpan.org/pod/WWW::Shorten';
         my $short_url = makeashorterlink($url);
         my $long_url  = makealongerlink($short_url);

         # - OR -
         # If you don't like the long function names:

         use WWW::Shorten 'TinyURL', ':short';
         my $short_url = short_link($url);
         my $long_url = long_link( $short_url );

See Also