diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-11-28 05:00:45 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-11-28 05:00:45 -0600 |
commit | 0855b8d28197bb7f92594526fe5f3277d34f9e6d (patch) | |
tree | 1d172b8862d73065d69490e05dd2f254db4cdf85 /lib/Crawl/Bot.pm | |
parent | b783f95169d9ee4ddb32ef07ba6546a341a948ed (diff) | |
download | crawlbot-0855b8d28197bb7f92594526fe5f3277d34f9e6d.tar.gz crawlbot-0855b8d28197bb7f92594526fe5f3277d34f9e6d.zip |
add code for checking the wiki for added pages
Diffstat (limited to 'lib/Crawl/Bot.pm')
-rw-r--r-- | lib/Crawl/Bot.pm | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |