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