NAME
WWW::LongURL - Perl interface to the LongURL API.
SYNOPSIS
use WWW::LongURL;
my $longurl = WWW::LongURL->new();
my $expanded_url = $longurl->expand('http://bit.ly/cZcYFn');
if (! $expanded_url) {
die $longurl->error(), "\n";
}
DESCRIPTION
A simple interface for using the LongURL API to expand shortened URLs.
You can expand a bit.ly URL like so:
my $url = $longurl->expand($some_bitly_url);
METHODS
new
-
Constructor
expand($url)
-
On success, will return the expanded URL from LongURL. On failure, returns undef.
error
-
Returns the last error message.
SUPPORTED SHORTENING SERVICES
LongURL will expand the URL from over 200 supported shortening services.
See http://longurl.org/services
REPOSITORY
Development is on-going at: https://github.com/kevinspencer/WWW-LongURL
AUTHOR
Kevin Spencer, kspencer@cpan.org
COPYRIGHT
Copyright (c) 2011. Kevin Spencer
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html