NAME

WWW::Shorten::Akari - Reduces the presence of URLs using http://waa.ai

VERSION

version v0.3.0

SYNOPSIS

use WWW::Shorten::Akari;

my $presence = WWW::Shorten::Akari->new;
my $short = $presence->reduce("http://google.com");
my $long  = $presence->increase($short);

$short = makeashorterlink("http://google.com");
$long  = makealongerlink($short);

DESCRIPTION

Reduces the presence of URLs through the http://waa.ai service. This module has both an object interface and a function interface as defined by WWW::Shorten. This module is compatible with WWW::Shorten::Simple and, since http://waa.ai always returns the same short URL for a given long URL, may be memoized.

METHODS

new

Creates a new instance of Akari.

reduce($url)

Reduces the presence of the $url. Returns the shortened URL.

On failure, or if $url is false, carps and returns false.

Aliases: shorten, short_link, makeashorterlink

increase($url)

Increases the presence of the $url. Returns the original URL.

On failure, or if $url is false, or if the $url isn't a shortened link from http://waa.ai, carps and returns false.

Aliases: lenghten, long_link, extract, makealongerlink

NOTES

WWW::Shorten::Akari should preferrably be used with an empty list as arguments, like use WWW::Shorten::Akari qw{};, and then used through the OO API.

If no arguments are given to use, WWW::Shorten::Akari is imported with ':default' by default, which imports makeashorterlink and makealongerlink as per WWW::Shorten conventions. If the module is used with ':short', the functions short_link and long_link are imported.

FUNCTIONS

makeashorterlink($url)

Makes a shorter link.

Alias: short_link

makealongerlink($url)

The opposite of "makeashorterlink($url)".

Alias: long_link

SOURCE CODE

https://github.com/Kovensky/WWW-Shorten-Akari

AUTHOR

Kovensky <diogomfranco@gmail.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Diogo Franco.

This is free software, licensed under:

The (two-clause) FreeBSD License