Dave Cross > WWW-Shorten-NotLong-2.00 > WWW::Shorten::NotLong

Download:
WWW-Shorten-NotLong-2.00.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 2.00   Source  

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.

Functions ^

makeashorterlink

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.

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

makealongerlink

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.

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/

syntax highlighting: