svnbot
This is a small IRC bot using Net::IRC capable of relaying new commits to a Subversion repository to IRC.
Net::IRC
$ ./svnbot.pl nick host[:port] interval repository show_branch sep_header
where
repository
is the path to the SVN repository (e.g. . or http://svn.perl.org/parrot/,
show_branch
specifies whether branch information should be shown (true|false), and
true
false
sep_header
specifies whether a separate header line should be outputted (true|false).
There's no separate installation step needed, simply run svnbot.pl and supply appropriate options.
svnbot.pl
"I configured svnbot to check for new commits every n seconds, but the commits usually take much more time to show up. Why is this so?"
If you look at svnbot's source, you'll see that it really tries to check the SVN repository after n seconds elapsed. The problem is, that svnbot doesn't have a chance to check, because Net::IRC is busy reading from the socket to the IRC server. Unfortunately, the call to .readline Net::IRC issues is blocking, meaning that the operating system will suspend svnbot.pl until it receives some data from the IRC server.
.readline
In Perl 5, the problem would be easy to remedy, as perl5 allows you to set timeouts. But, as Pugs doesn't have a mechanism to set timeouts yet, there's nothing Net::IRC can do about it.
To install Perl6::Pugs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl6::Pugs
CPAN shell
perl -MCPAN -e shell install Perl6::Pugs
For more information on module installation, please visit the detailed CPAN module installation guide.