POE::C...regator(3pm)
π NAME π
POE::Component::RSSAggregator β bestie, it watches multiple RSS feeds for new headlines so you don't have to refresh anything like a peasant. β¨
(And yes, the real manual page says "Muliple". We're keeping that typo, it's iconic, it's part of the lore. π)
πΈ VERSION πΈ
Version 1.11 β she's vintage, she's stable, she's serving. π
β¨ SYNOPSIS β¨
Okay so here's the whole vibe. Copy this, it works:
#!/usr/bin/perl
use strict;
use warnings;
use POE;
use POE::Component::RSSAggregator;
my @feeds = (
{ url => "http://www.jbisbee.com/rdf/",
name => "jbisbee",
delay => 10,
},
{ url => "http://lwn.net/headlines/rss",
name => "lwn",
delay => 300,
},
);
POE::Session->create(
inline_states => {
_start => \&init_session,
handle_feed => \&handle_feed,
},
);
$poe_kernel->run();
sub init_session {
my ( $kernel, $heap, $session ) = @_[ KERNEL, HEAP, SESSION ];
$heap->{rssagg} = POE::Component::RSSAggregator->new(
alias => 'rssagg',
debug => 1,
callback => $session->postback("handle_feed"),
tmpdir => '/tmp', # optional caching
);
$kernel->post( 'rssagg', 'add_feed', $_ ) for @feeds;
}
sub handle_feed {
my ( $kernel, $feed ) = ( $_[KERNEL], $_[ARG1]->[0] );
for my $headline ( $feed->late_breaking_news ) {
# do stuff with the XML::RSS::Headline object
print $headline->headline . "\n";
}
}
Like. That's it. That's the whole girlboss pipeline. π¦
π CONSTRUCTORS π
π« POE::Component::RSSAggregator->new( %hash );
Spins up a brand new instance of PoCo::RSSAggregator, fresh out the box, no cap. π«Ά
Here's what you can hand her:
aliasβ the POE alias you want your PoCo::RSSAggregator instance to live under. That's her name, that's her whole identity.debugβ a boolean that turns on verbose output. Heads up bestie:debugalso gets passed down to theXML::RSS::Feedinstances, so they start yapping too. Everything gets chatty. π£οΈtmpdirβ this argument gets passed along toXML::RSS::Feedas the directory used to cache RSS between fetches (and between instances). So it remembers stuff between runs. Memory of an elephant, fr fr. πhttp_aliasβ Optional. The alias of an existingPoCoCl::HTTP.follow_redirectsβ Optional. Only relevant if you don't already have an existingPoCoCl::HTTP. This argument gets passed toPoCoCl::HTTPto tell it what redirect-following level to use. (Defaults to2.)
π METHODS π
$rssagg->feed_listβ hands you back the current feeds as an array or an array_ref. Whatever you're in the mood for. π$rssagg->feedsβ returns a hash ref of feeds, where the key is the feed's name. That hash reference living under each key is the one passed toXML::RSS::Feed->new($hash_ref). (seeXML::RSS::Feed)$rssagg->feed( $feed_name )β accessor, so you can grab aXML::RSS::Feedobject by the feed's name.$rssagg->add_feed( $hash_ref )β the hash reference you pass in here gets passed toXML::RSS::Feed->new($hash_ref). (seeXML::RSS::Feed)$rssagg->remove_feed( $feed_name )β pass in the name of the feed you want gone. Bye babe. π$rssagg->pause_feed( $feed_name )β pass in the name of the feed you want to pause. Not a block, just a pause, it's a boundary thing.$rssagg->resume_feed( $feed_name )β pass in the name of the feed you want to resume (the one you paused earlier, you know the one).$rssagg->shutdownβ shuts down the instance of PoCo::RSSAggregator. Closing time, lights off. π
π AUTHOR π
Jeff Bisbee, "<jbisbee at cpan.org>" β the originator, the main character, the blueprint. π«‘
π BUGS π
Please report any bugs or feature requests to "bug-poe-component-rssaggregator at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POE-Component-RSSAggregator>.
Here's the deal: he gets notified, and then you automatically get notified of progress on your bug as he makes changes. It's a whole closed loop, very mutual, very communicative. π
π SUPPORT π
You can find documentation for this module with the perldoc command:
perldoc POE::Component::RSSAggregator
You can also look for information at:
- AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/POE-Component-RSSAggregator>
- CPAN Ratings
<http://cpanratings.perl.org/d/POE-Component-RSSAggregator>
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-RSSAggregator>
- Search CPAN
<http://search.cpan.org/dist/POE-Component-RSSAggregator>
Four whole places to go look things up. She's covered, bestie. π
π§ ACKNOWLEDGEMENTS π§
Special thanks to Rocco Caputo, Martijn van Beers, Sean Burke, Prakash Kailasa and Randal Schwartz for their help, guidance, patience, and bug reports.
And to quote the man himself: guys thanks for actually taking time to use the code and give good, honest feedback. π₯Ήπ Genuinely the sweetest thing on the whole page.
β COPYRIGHT & LICENSE β
Copyright 2006 Jeff Bisbee, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π¦ SEE ALSO π¦
XML::RSS::Feed, XML::RSS::Headline, XML::RSS::Headline::PerlJobs, XML::RSS::Headline::Fark
and that's the whole page, bestie!! π this one's perl v5.34.0, dated 2022-06-17, straight from the User Contributed Perl Documentation β go watch some feeds and slay. πβ¨π«Ά
π¦ where this page comes from
- debian bookworm: libpoe-component-rssaggregator-perl 1.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpoe-component-rssaggregator-perl 1.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpoe-component-rssaggregator-perl 1.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpoe-component-rssaggregator-perl 1.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpoe-component-rssaggregator-perl 1.11-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms