{ =head1 NAME HTML::RSSAutodiscovery - methods for retreiving RSS-ish information from an HTML document. =head1 SYNOPSIS use HTML::RSSAutodiscovery; use Data::Dumper; my $url = "http://www.diveintomark.org/"; my $html = HTML::RSSAutodiscovery->new(); print &Dumper($html->parse($url)); # Mark's gone a bit nuts with this and # the list is too long to include here... =head1 DESCRIPTION Methods for retreiving RSS-ish information from an HTML document. =cut package HTML::RSSAutodiscovery; use strict; use Exporter; use LWP::UserAgent; use HTTP::Request; use HTML::Parser; $HTML::RSSAutodiscovery::VERSION = '1.0'; @HTML::RSSAutodiscovery::ISA = qw (Exporter HTML::Parser); @HTML::RSSAutodiscovery::EXPORT = qw (); @HTML::RSSAutodiscovery::EXPORT_OK = qw (); =head1 OBJECT METHODS =head2 $pkg = HTML::RSSAutodiscovery->new() Object constructor. Returns an object. Woot! =cut sub new { my $pkg = shift; my $self = {}; bless $self,$pkg; if (! $self->init(@_)) { return undef; } return $self; } sub init { my $self = shift; $self->SUPER::init(start_h=> [\&_start,"self,tagname,attr"]); return 1; } =head2 $pkg->parse($arg) Parse an HTML document and return RSS-ish <link> information. I<$arg> may be either: =over =item * An HTML string, passed as a scalar reference. =item * A URI. =back Returns an array reference of hash references whose keys are : =over =item * I