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