This is a small IRC bot using
Net::IRC capable of relaying new commits to a Subversion repository to IRC.
$ ./svnbot.pl nick host[:port] interval repository show_branch sep_header
is the path to the SVN repository (e.g. . or http://svn.perl.org/parrot/,
specifies whether branch information should be shown (
specifies whether a separate header line should be outputted (
There's no separate installation step needed, simply run
svnbot.pl and supply appropriate options.
"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
Net::IRC issues is blocking, meaning that the operating system will suspend
svnbot.pl until it receives some data from the IRC server.
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.