summaryrefslogtreecommitdiffstats
path: root/lib/Crawl/Bot/Plugin.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-11-28 15:40:24 -0600
committerJesse Luehrs <doy@tozt.net>2009-11-28 15:40:46 -0600
commit29c0d80c40d44eb77e3320c5c883357eb6b6f604 (patch)
treef20d05b0defcb969cb481240db4b454a7a5b95dd /lib/Crawl/Bot/Plugin.pm
parent765eca33ac35568caa92c5559cd1d20d0ad7315b (diff)
downloadcrawlbot-29c0d80c40d44eb77e3320c5c883357eb6b6f604.tar.gz
crawlbot-29c0d80c40d44eb77e3320c5c883357eb6b6f604.zip
make plugins a bit more flexible
Diffstat (limited to 'lib/Crawl/Bot/Plugin.pm')
-rw-r--r--lib/Crawl/Bot/Plugin.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Crawl/Bot/Plugin.pm b/lib/Crawl/Bot/Plugin.pm
new file mode 100644
index 0000000..c70e102
--- /dev/null
+++ b/lib/Crawl/Bot/Plugin.pm
@@ -0,0 +1,18 @@
+package Crawl::Bot::Plugin;
+use Moose;
+
+has bot => (
+ is => 'ro',
+ isa => 'Crawl::Bot',
+ required => 1,
+ weak_ref => 1,
+ handles => [qw(say_all data_dir)],
+);
+
+# not all plugins require a tick method
+sub tick { }
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+
+1;