NAME
XML::RSS::Headline::PerlMonks - Subclass of XML::RSS::Headline for reading RSS feed from perlmonks.org
SYNOPSIS
use XML::RSS::Feed;
use XML::RSS::Headline::PerlMonks;
use LWP::Simple qw(get);
my $feed = XML::RSS::Feed->new(
'name' => 'newmonknodes',
'url' => 'http://perlmonks.org/index.pl?node_id=30175;xmlstyle=rss',
'hlobj' => 'XML::RSS::Headline::PerlMonks',
'tmpdir' => '/tmp', # for caching
);
while (1) {
$feed->parse( get( $feed->url ) );
for my $post ( $feed->late_breaking_news ) {
print "New perlmonks posting from " . $post->authortitle . "\n";
print "Category: " . $post->category . "\n";
print "Subject: " . $post->headline . "\n";
print "Link: " . $post->url . "\n\n";
}
sleep( $feed->delay );
}
DESCRIPTION
This module extends the base XML::RSS::Headline package which is used by XML::RSS::Feed to parse and optionally cache the RSS feed from perlmonks.org. Optionally this module can be used inside the POE::Component::RSSAggregator module as one of many feeds to monitor.
METHOD OVERRIDES
item()
This overrides the item() method in XML::RSS::Headline and adds the parsing of item nodes which use the perlmonks namespace.
NEW ATTRIBUTES
These are new attributes that come from nodes using the perlmonks namespace. With the exception of category(), they are all simple getter/setter methods. Category does some translation from the perlmonks abbreviation for category to a prettier description as used in perlmonks' menus
category()
authortitle()
author_user()
mode_id()
createtime()
SEE ALSO
XML::RSS::Feed, XML::RSS::Headline, POE::Component::RSSAggregator
http://perl.donshanks.com/modules
BUGS AND SUPPORT
Please report any bugs or feature requests to bug-xml-rss-headline-perlmonks [at] rt [dot] cpan [dot] org
or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=XML-RSS-Headline-PerlMonks.
ACKNOWLEDGEMENTS
Thanks to Jeff Bisbee for XML::RSS:Feed, it made my life so much simpler, to the monks at perlmonks.org, and my employer WhitePages.com for giving me time and resources to test things out.
AUTHOR
Don Shanks, <donshank [at] cpan [dot] org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Don Shanks
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.