Perl Module for use with Yourls Released

CamelI wanted to put an image of the Perl Camel up on this post but it would have required getting permission from O’Reilly to do so. Hence, I decided to use this beautiful picture by angeloux.

I just got around to finishing the alpha version of WWW::Shorten::Yourls which is a simple Perl module to shorten URLs using the open source Yourls.org project.

You can take a look at the code at GitHub or install the code using CPAN.


#! /usr/local/bin/perl
#
# LICENSE: This code is licensed under the same license as Perl itself
#
##############################################
use WWW::Shorten::Yourls;

my $url = "http://www.teknatus.com";
my $uid = "userid_for_yourls_install";
my $passwd = "password_for_yourls_install";
my $base = "base_url_for_yoursl_install";

my $yourls = WWW::Shorten::Yourls->new(URL => $url,
USER => $uid,
PASSWORD => $passwd,
BASE => $base);

print $yourls;

my $yourl = makeashorterlink($url,$uid,$passwd,$base);
print $yourl;

1;

Do let me know what you think.


Posted

in

by

Tags:

Comments

One response to “Perl Module for use with Yourls Released”

  1. […] Setting up Yourls was a breeze, now came the fun part of doing something with it beyond the bookmarklet. I decided that I would convert all my shared Google Reader items to use Yourls. To do this, I created WWW::Shorten::Yourls which I had introduced in this post. […]