62f2e13836ac6a3b2b8930e5a23f969be39b9aa6
[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
22 # an indirect dep. needs a certain version.
23 requires 'Tie::RefHash' => '1.34';
24
25 # for Test::Store
26 requires 'Test::More';
27
28 test_requires 'Test::Deep';
29 test_requires 'Test::Exception';
30 test_requires 'Test::MockObject' => '1.01';
31
32 WriteAll;
33
34 sub is_upgrading_needed {
35     my %state = (
36         Cookie => 0.03,
37         URI    => 0.02,
38     );
39
40     foreach my $module (keys %state) {
41         if ( eval "require Catalyst::Plugin::Session::State::$module" and
42         ${"Catalyst::Plugin::Session::State::${module}::VERSION"} < $state{$module} ) {
43             warn <<WARN;
44
45 ********** NOTE **********
46
47 Catalyst::Plugin::Session::State::$module must also be updated!
48
49 The currently installed version is *not* compatible with this version of
50 Catalyst::Plugin::Session!
51
52 The updated versions have been added to the prerequisites.
53
54 **************************
55 WARN
56         }
57     }
58 }