Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Shorten CPAN distribution.

Report information
The Basics
Id: 53749
Status: resolved
Priority: 0/
Queue: WWW-Shorten

People
Owner: DAVECROSS [...] cpan.org
Requestors: struan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.06
Fixed in: 3.00



Subject: Tests fail for shorl.com
Hi, The test for shorl.com are failing because, well, it doesn't work with shorl.com ;). The problem is that it returns a page saying that a URL hasn't been submitted. I took a guess that they'd stopped accepting POST requests and if you turn the query in to a GET it all seems to work. Anyway, the following patch makes it work for me. It does mean adding URI::Escape as a dependancy. Cheers Struan --- lib/WWW/Shorten/Shorl.pm.old 2010-01-16 16:57:09.000000000 +0000 +++ lib/WWW/Shorten/Shorl.pm 2010-01-16 17:13:36.000000000 +0000 @@ -27,6 +27,7 @@ use 5.006; use strict; use warnings; +use URI::Escape; use base qw( WWW::Shorten::generic Exporter ); our @EXPORT = qw(makeashorterlink makealongerlink); @@ -51,8 +52,8 @@ { my $url = shift or croak 'No URL passed to makeashorterlink'; my $ua = __PACKAGE__->ua(); - my $shorl = 'http://shorl.com/create.php'; - my $resp = $ua->post($shorl, [ url => $url ]); + my $shorl = 'http://shorl.com/create.php?url='; + my $resp = $ua->get($shorl . uri_escape( $url )); return unless $resp->is_success; if ($resp->content =~ m! \QShorl:\E
Yeah, sorry about that. I got a patch from someone else over Christmas. I released a separate WWW::Shorten::Shorl (following my new preferred model of releasing subclasses separately) but I forgot to release the new version of WWW::Shorten which removed Shorl support. Anyway, WWW::Shorten 3.00 is now on CPAN and that doesn't have Shorl support. For that you'll need WWW::Shorten::Shorl (which works correctly). Cheers, Dave...