Chase Whitener > WWW-Shorten-SnipURL > WWW::Shorten::SnipURL

Download:
WWW-Shorten-SnipURL-2.022.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 2.022   Source  

NAME ^

WWW::Shorten::SnipURL - Perl interface to http://SnipURL.com

SYNOPSIS ^

  use strict;
  use warnings;

  use WWW::Shorten 'SnipURL'; # recommended
  # use WWW::Shorten::SnipURL; # also available

  my $long_url = 'http://www.foo.com/bar/';
  my $short_url = makeashorterlink($long_url);

  $long_url  = makealongerlink($short_url);

DESCRIPTION ^

WARNING: http://snipurl.com does not provide an API. We must scrape the resulting HTML.

* Also, their service has been up and down quite a bit lately. We have disabled live tests due to this.

* You have been warned. We suggest using another WWW::Shorten service.

A Perl interface to the web service http://SnipURL.com. The service maintains a database of long URLs, each of which has a unique identifier or nickname. For more features, please visit http://snipurl.com/features.

Functions ^

WWW::Shorten::SnipURL makes the following functions available.

makeashorterlink

  my $short = makeashorterlink('http://www.example.com/');

The function makeashorterlink will call use the web service, passing it your long URL and will return the shorter version.

makealongerlink

  my $long = makealongerlink('ablkjadf2314sfd');
  my $long = makealongerlink('http://snipurl.com/ablkjadf2314sfd');

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

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

AUTHOR ^

Shashank Tripathi <shank@shank.com>

CONTRIBUTORS ^

COPYRIGHT AND LICENSE ^

See the main WWW::Shorten docs.

SEE ALSO ^

WWW::Shorten, http://shorl.com/

syntax highlighting: