Back to top


NAME

 UpdateChecker::Web -- to check WebPage whether updated or not.

Back to top


SYNOPSIS

 # create UpdateChecker object
 $wuc = new UpdateChecker::Web({date => 'File'});
 # set timout 10 sec.
 $wuc->timeout(10);
 # set default filter
 $wuc->default_filter('rss')
 # set rss option
 $wuc->rss(1);

Back to top


DESCRIPTION

Have you been tired to check your favorite web pages which you don't know whether they have updated from previous check or not? With this module, you can know updated part and percentage of difference from previous check without going there.

Back to top


REQUIREMENT

This module need below modules:

 LWP::UserAgent
 HTML::TokeParser::Simple
 HTML::RSSAutodiscovery
 XML::RSS

Back to top


CONSTRUCTOR

new
 $wuc = new UpdateChecker::Web({data => 'File'}, %option);

It creates UpdateChecker::Web object.

%option is for example;

 disable_filter => 0 not use filter
 html2text => 1 ... use filter html2text
 rss => 1 ... use filter rss

Back to top


METHODS

timeout
 my $timeout = $wuc->timeout($sec);
 my $timeout = $wuc->timeout;
default_filter
 my $f = $wuc->default_filter($filter);
 my $f = $wuc->default_filter;

$filter is filter name. See filter section.

rss
 UpdateChecker::Web->rss(1);
 $wuc->rss(1);
 $wuc->rss('http://example.jp/index.rss');

It takes one argument, 1 or undef, or rss location. If its argument is 1, it seek rss file from target contents. When it detects target's rss file, it sets rss location as its target's. When it cannnot detect, it understands target has no rss file.

If its argument is rss file location, it parses rss file. When it doesn't exist or doesn't parse, It understands target has no rss file.

Back to top


FILTERS

html2text or Web_x_html2text
 HTML to TEXT.
html2text2 or Web_x_html2text2
 HTML to TEXT except link.
rss or Web_x_rss
It parses RSS and select title with XML::RSS.

Back to top


AUTHOR

 Kato Atsushi <ktat.is at gmail.com>

Back to top


COPYRIGHT

 Copyright 2003 by Kato Atsushi <ktat.is at gmail.com>.
 This program is free software; you can redistribute it
 and/or modify it under the same terms as Perl itself.
 See http://www.perl.com/perl/misc/Artistic.html

Back to top