Chop out crap that is not needed
[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 resources repository => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session.git';
36
37 author_tests 't/author';
38
39 WriteAll;
40
41 sub is_upgrading_needed {
42     my %state = (
43         Cookie => 0.03,
44         URI    => 0.02,
45     );
46
47     foreach my $module (keys %state) {
48         my $package = 'Catalyst::Plugin::Session::State::' . $module;
49
50         next if not eval "require $package;";
51
52         if( not eval { $package->VERSION( $state{ $module } ); } ) {
53             warn <<WARN;
54 ********** NOTE **********
55
56 $package must also be updated!
57
58 The currently installed version is *not* compatible with this version of
59 Catalyst::Plugin::Session!
60
61 The updated versions have been added to the prerequisites.
62
63 **************************
64 WARN
65         }
66     }
67 }