WWW::Shorten::RevCanonical - Shorten URL using rev="canonical"


WWW-Shorten-RevCanonical documentation  | view source Contained in the WWW-Shorten-RevCanonical distribution.

Index


NAME

Top

WWW::Shorten::RevCanonical - Shorten URL using rev="canonical"

SYNOPSIS

Top

  use WWW::Shorten 'RevCanonical';

  my $short_url = makeashorterlink($long_url); # Note that this could fail and return undef

  # Or, use WWW::Shorten::Simple wrapper
  use WWW::Shorten::Simple;

  my @shorteners = (
      WWW::Shorten::Simple->new('RevCanonical'), # Try this first
      WWW::Shorten::Simple->new('TinyURL'),      # Then fallback to TinyURL
  );

  my $short_url;
  for my $shortener (@shorteners) {
      $short_url = $shortener->shorten($long_url)
          and last;
  }

DESCRIPTION

Top

WWW::Shorten::RevCanonical is a WWW::Shorten plugin to extract rev="canonical" link from HTML web pages. Unlike other URL shortening services, the ability to make a short URL from rev="canonical" depends on whether the target site implements the tag, so the call to makeashorterlink could fail, and in that case you'll get undef result. You might want to fallback to other shorten services like TinyURL.

AUTHOR

Top

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Top

WWW::Shorten, WWW::Shoten::Simple, http://revcanonical.wordpress.com/


WWW-Shorten-RevCanonical documentation  | view source Contained in the WWW-Shorten-RevCanonical distribution.