Scheduler, more tests, almost feature-complete, todo: YAML
[catagits/Catalyst-Plugin-Scheduler.git] / t / lib / Catalyst / Plugin / PluginTest.pm
CommitLineData
f9d8e3cf 1package Catalyst::Plugin::PluginTest;
2
3use strict;
4use warnings;
5use NEXT;
6
7sub setup {
8 my $c = shift;
9 $c->NEXT::setup(@_);
10
11 if ( $c->can('schedule') ) {
12 $c->schedule(
13 at => '* * * * *',
14 event => \&plugin_test,
15 );
16 }
17}
18
19sub plugin_test {
20 my $c = shift;
21
22 # write out a file so the test knows we did something
23 my $fh = IO::File->new( $c->path_to( 'plugin_test.log' ), 'w' )
24 or die "Unable to write log file: $!";
25 close $fh;
26}
27
281;
29