prepare release meta info
[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 'List::Util';
22 requires 'Object::Signature';
23 requires 'MRO::Compat';
24 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00801';
25 requires 'Moose' => '0.76';
26 requires 'HTML::Entities';
27
28 # an indirect dep. needs a certain version.
29 requires 'Tie::RefHash' => '1.34';
30
31 # for Test::Store
32 requires 'Test::More' => '0.88';
33
34 test_requires 'Test::Deep';
35 test_requires 'Test::Exception';
36 test_requires 'Test::WWW::Mechanize::PSGI';
37 resources repository => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session.git';
38
39 author_tests 't/author';
40
41 WriteAll;
42
43 sub is_upgrading_needed {
44     my %state = (
45         Cookie => 0.03,
46         URI    => 0.02,
47     );
48
49     foreach my $module (keys %state) {
50         my $package = 'Catalyst::Plugin::Session::State::' . $module;
51
52         next if not eval "require $package;";
53
54         if( not eval { $package->VERSION( $state{ $module } ); } ) {
55             warn <<WARN;
56 ********** NOTE **********
57
58 $package must also be updated!
59
60 The currently installed version is *not* compatible with this version of
61 Catalyst::Plugin::Session!
62
63 The updated versions have been added to the prerequisites.
64
65 **************************
66 WARN
67         }
68     }
69 }