Iain Truskett (see Andy Lester) > WWW-Shorten > WWW::Shorten::NotLong

Download:
WWW-Shorten-1.88.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  4
View Bugs
Report a bug
Module Version: 1.81   Source   Latest Release: WWW-Shorten-2.05

NAME ^

WWW::Shorten::NotLong - Perl interface to notlong.com

SYNOPSIS ^

  use WWW::Shorten 'NotLong';

  $short_url = makeashorterlink($long_url);
  $short_url = makeashorterlink($long_url, nickname => $nickname);
  ($short_url,$password) = makeashorterlink($long_url);
  ($short_url,$password) = makeashorterlink($long_url, nickname => $nickname);

  $long_url  = makealongerlink($short_url);
  $long_url  = makealongerlink($nickname);

DESCRIPTION ^

A Perl interface to the web site notlong.com. Notlong.com simply maintains a database of long URLs, each of which has a unique identifier.

The function makeashorterlink will call the notlong.com web site passing it your long URL and will return the shorter (notlong) version. If used in a list context, then it will return both the notlong URL and the password.

If you pass a nickname, the notlong service will use your provided (alpha-numeric) string as the unique identifier, provided that it has not already been assigned previously.

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

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

Note that notlong.com, unlike TinyURL and MakeAShorterLink, returns a unique code for every submission.

EXPORT

makeashorterlink, makealongerlink

SUPPORT, LICENCE, THANKS and SUCH ^

See the main WWW::Shorten docs.

AUTHOR ^

Eric Hammond <ehammond@thinksome.com>

Based almost entirely on WWW::Shorten::Shorl by Iain Truskett <spoon@cpan.org> which was based on WWW::MakeAShorterLink by Dave Cross <dave@dave.org.uk>

SEE ALSO ^

WWW::Shorten, perl, http://notlong.com/