From 0855b8d28197bb7f92594526fe5f3277d34f9e6d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 28 Nov 2009 05:00:45 -0600 Subject: add code for checking the wiki for added pages --- lib/Crawl/Bot.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/Crawl/Bot.pm') diff --git a/lib/Crawl/Bot.pm b/lib/Crawl/Bot.pm index 3b2fd70..47738fb 100644 --- a/lib/Crawl/Bot.pm +++ b/lib/Crawl/Bot.pm @@ -37,10 +37,22 @@ has mantis => ( }, ); +has wiki => ( + is => 'ro', + isa => 'Crawl::Bot::Wiki', + lazy => 1, + default => sub { + my $self = shift; + require Crawl::Bot::Wiki; + Crawl::Bot::Wiki->new(bot => $self); + }, +); + sub BUILD { my $self = shift; File::Path::mkpath($self->data_dir); $self->mantis; + $self->wiki; } before say => sub { @@ -52,6 +64,7 @@ before say => sub { sub tick { my $self = shift; $self->mantis->tick; + $self->wiki->tick; return $self->update_time; } -- cgit v1.2.3-54-g00ecf