4 my $build = Module::Build->new(
5 create_makefile_pl => 'passthrough',
7 module_name => 'Catalyst::Plugin::Static::Simple',
10 'MIME::Types' => '1.15',
12 create_makefile_pl => 'passthrough',
18 # Require File::Slurp only for older Catalyst versions
19 my $cat = $build->check_installed_status('Catalyst');
20 if ( $cat->{have} le '5.33' ) {
21 $build->requires->{'File::Slurp'} = 0;
24 # If the user has the SubRequest plugin installed, tell them to upgrade
25 my $subreq = $build->check_installed_status('Catalyst::Plugin::SubRequest');
26 if ( $subreq->{have} lt '0.08' ) {
27 print "** WARNING **\n"
28 . "You appear to have a version of Catalyst::Plugin::SubRequest "
29 . "older than 0.08.\n"
30 . "You must upgrade to SubRequest 0.08 or later if you use it "
31 . "in any applications with Static::Simple.\n";
32 $build->requires->{'Catalyst::Plugin::SubRequest'} => '0.08';
35 $build->create_build_script;