I 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.
You must be logged in to post a comment.