Static::Simple 0.15, fixed issue where dirs config option did not quote metachars
[catagits/Catalyst-Plugin-Static-Simple.git] / Build.PL
1 use strict;
2 use Module::Build;
3
4 my $build = Module::Build->new(
5     create_makefile_pl => 'passthrough',
6     license            => 'perl',
7     module_name        => 'Catalyst::Plugin::Static::Simple',
8     requires           => { 
9         'Catalyst'    => '5.30',
10         'MIME::Types' => '1.15',
11     },
12     create_makefile_pl => 'passthrough',
13     test_files   => [
14         glob('t/*.t') 
15     ]
16 );
17
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;
22 }
23
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';
33 }
34
35 $build->create_build_script;