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