d84829ab101d725f86e15f3d9e793396c8e01cb0
[catagits/Catalyst-Plugin-Session.git] / Makefile.PL
1 use inc::Module::Install 0.68;
2
3 if ( -e 'MANIFEST.SKIP' ) {
4     system( 'pod2text lib/Catalyst/Plugin/Session.pm > README' )
5         and die("Could not run pod2text on lib/Catalyst/Plugin/Session.pm");
6 }
7
8 is_upgrading_needed();
9
10 perl_version '5.008';
11
12 name 'Catalyst-Plugin-Session';
13 all_from 'lib/Catalyst/Plugin/Session.pm';
14
15 requires 'Catalyst::Runtime' => '5.7010';
16 requires 'Digest';
17 requires 'File::Spec';
18 requires 'File::Temp';
19 requires 'Object::Signature';
20 requires 'MRO::Compat';
21 requires 'Moose';
22 requires 'MooseX::Emulate::Class::Accessor::Fast';
23
24 # an indirect dep. needs a certain version.
25 requires 'Tie::RefHash' => '1.34';
26
27 # for Test::Store
28 requires 'Test::More';
29
30 test_requires 'Test::Deep';
31 test_requires 'Test::Exception';
32 test_requires 'Test::MockObject' => '1.01';
33
34 WriteAll;
35
36 sub is_upgrading_needed {
37     my %state = (
38         Cookie => 0.03,
39         URI    => 0.02,
40     );
41
42     foreach my $module (keys %state) {
43         if ( eval "require Catalyst::Plugin::Session::State::$module" and
44         ${"Catalyst::Plugin::Session::State::${module}::VERSION"} < $state{$module} ) {
45             warn <<WARN;
46
47 ********** NOTE **********
48
49 Catalyst::Plugin::Session::State::$module must also be updated!
50
51 The currently installed version is *not* compatible with this version of
52 Catalyst::Plugin::Session!
53
54 The updated versions have been added to the prerequisites.
55
56 **************************
57 WARN
58         }
59     }
60 }