Tatsuhiko Miyagawa > WWW-Cache-Google-0.04 > WWW::Cache::Google

Download:
WWW-Cache-Google-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

WWW::Cache::Google - URI class for Google cache

SYNOPSIS ^

  use WWW::Cache::Google;

  $cache = WWW::Cache::Google->new('http://www.yahoo.com/');

  $url  = $cache->as_string;    # cache URL
  $html = $cache->fetch;        # fetches via LWP::Simple

DESCRIPTION ^

Oops, 404 Not Found. But wait ... there might be a google cache!

WWW::Cache::Google provides an easy way conversion from an URL to Google cache URL.

If all you want is only to get cache content, consider using Google Web APIs at http://www.google.com/apis/index.html

  $html = SOAP::Lite
      ->uri('urn:GoogleSearch')
      ->proxy('http://api.google.com/search/beta2') # may change
      ->doGetCachedPage($GoogleKey, 'http://cpan.org/')
      ->result;

METHODS ^

$cache = WWW::Cache::Google->new($url);

constructs WWW::Cache::Google instance.

$orig_uri = $cache->orig;

returns original URL as URI instance.

$cache_uri = $cache->cache;

returns Google cache URL as URI instance.

$html = $cache->fetch;

gets HTML contents of Google cache. Requires LWP::Simple.

$url_str = $cache->as_string;

returns Google cache's URL as string. Every method defined in URI class is autoloaded through $cache->cache. See URI for details.

AUTHOR ^

Tatsuhiko Miyagawa <miyagawa@bulknews.net>

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

It comes WITHOUT WARRANTY OF ANY KIND.

SEE ALSO ^

WWW::Cache::Google::Imode, URI, URI::Escape, LWP::Simple, http;//www.google.com/ http://www.google.com/apis/index.html

syntax highlighting: