diff options
author | Neil Moore <neil@s-z.org> | 2012-12-12 17:45:08 -0600 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-12-12 17:45:08 -0600 |
commit | 350fd476056b460968449af0d3b7cabc5e203f35 (patch) | |
tree | b4ade712131c53f7fde06b29cf4e399bbd01e50f | |
parent | cdc74e54598c2a6ed2452e8b0eb11b426673e89b (diff) | |
download | crawlbot-350fd476056b460968449af0d3b7cabc5e203f35.tar.gz crawlbot-350fd476056b460968449af0d3b7cabc5e203f35.zip |
Allow disabling polling in the Mantis plugin.
-rw-r--r-- | lib/Crawl/Bot/Plugin/Mantis.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Crawl/Bot/Plugin/Mantis.pm b/lib/Crawl/Bot/Plugin/Mantis.pm index 16e48a7..d1e67ca 100644 --- a/lib/Crawl/Bot/Plugin/Mantis.pm +++ b/lib/Crawl/Bot/Plugin/Mantis.pm @@ -4,6 +4,12 @@ extends 'Crawl::Bot::Plugin'; with 'Crawl::Bot::Role::RSS'; +has enabled => ( + is => 'ro', + isa => 'Bool', + default => 1 +); + sub rss_feed { 'https://crawl.develz.org/mantis/issues_rss.php' } sub item_to_id { @@ -27,6 +33,7 @@ sub said { sub tick { my $self = shift; + return unless $self->enabled; $self->each_current_item(sub { my $item = shift; my $id = $self->item_to_id($item); |