POE::Component::IRC::Plugin::WWW::Reddit::TIL - IRC plugin that fetches random TIL headlines from reddit.com/r/TodayILearned
Version 0.01
use strict; use warnings; use POE qw(Component::IRC Component::IRC::Plugin::WWW::Reddit::TIL); my $irc = POE::Component::IRC->spawn( nick => 'nickname', server => 'irc.freenode.net', port => 6667, ircname => 'ircname', ); POE::Session->create(package_states => [main => [qw(_start irc_001)]]); $poe_kernel->run; sub _start { $irc->yield(register => 'all'); $irc->plugin_add('TIL' => POE::Component::IRC::Plugin::WWW::Reddit::TIL->new); $irc->yield(connect => {}); } sub irc_001 { $irc->yield(join => '#channel'); }
type !til (casing does not matter) to get a random title and link from the first page of http://www.reddit.com/r/todayilearned
Curtis Brandt, <curtis at cpan.org>
<curtis at cpan.org>
Please report bugs on my Github: https://github.com/aggrolite/POE-Component-IRC-Plugin-WWW-Reddit-TIL
Copyright 2013-2017 Curtis Brandt. See LICENSE for details.
To install POE::Component::IRC::Plugin::WWW::Reddit::TIL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::IRC::Plugin::WWW::Reddit::TIL
CPAN shell
perl -MCPAN -e shell install POE::Component::IRC::Plugin::WWW::Reddit::TIL
For more information on module installation, please visit the detailed CPAN module installation guide.