Merge flash in session and finalize before sending response patches
[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 }
6
7 is_upgrading_needed();
8
9 perl_version '5.008';
10
11 name 'Catalyst-Plugin-Session';
12 all_from 'lib/Catalyst/Plugin/Session.pm';
13
14 requires 'Catalyst::Runtime' => '5.7010';
15 requires 'Digest';
16 requires 'File::Spec';
17 requires 'File::Temp';
18 requires 'Object::Signature';
19 requires 'MRO::Compat';
20
21 # an indirect dep. needs a certain version.
22 requires 'Tie::RefHash' => '1.34';
23
24 # for Test::Store
25 requires 'Test::More';
26
27 test_requires 'Test::Deep';
28 test_requires 'Test::Exception';
29 test_requires 'Test::MockObject' => '1.01';
30
31 WriteAll;
32
33 sub is_upgrading_needed {
34     my %state = (
35         Cookie => 0.03,
36         URI    => 0.02,
37     );
38
39     foreach my $module (keys %state) {
40         if ( eval "require Catalyst::Plugin::Session::State::$module" and
41         ${"Catalyst::Plugin::Session::State::${module}::VERSION"} < $state{$module} ) {
42             warn <<WARN;
43
44 ********** NOTE **********
45
46 Catalyst::Plugin::Session::State::$module must also be updated!
47
48 The currently installed version is *not* compatible with this version of
49 Catalyst::Plugin::Session!
50
51 The updated versions have been added to the prerequisites.
52
53 **************************
54 WARN
55         }
56     }
57 }