Require Sub::Exporter.
[catagits/Catalyst-Runtime.git] / Makefile.PL
1 use inc::Module::Install 0.64;
2
3 perl_version '5.008001';
4
5 name 'Catalyst-Runtime';
6 all_from 'lib/Catalyst/Runtime.pm';
7
8 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00300';
9 requires 'Moose' => '0.59';
10 requires 'Carp';
11 requires 'Class::Inspector' => '1.06';
12 requires 'CGI::Simple::Cookie';
13 requires 'Data::Dump';
14 requires 'File::Modified';
15 requires 'HTML::Entities';
16 requires 'HTTP::Body'    => '1.04'; # makes uploadtmp work
17 requires 'HTTP::Headers' => '1.64';
18 requires 'HTTP::Request';
19 requires 'HTTP::Response';
20 requires 'HTTP::Request::AsCGI' => '0.5';
21 requires 'LWP::UserAgent';
22 requires 'Module::Pluggable' => '3.01';
23 requires 'Path::Class' => '0.09';
24 requires 'Scalar::Util';
25 requires 'Sub::Exporter';
26 requires 'Text::SimpleTable' => '0.03';
27 requires 'Time::HiRes';
28 requires 'Tree::Simple' => '1.15';
29 requires 'Tree::Simple::Visitor::FindByPath';
30 requires 'URI' => '1.35';
31 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
32 requires 'MRO::Compat';
33
34 test_requires 'NEXT';
35 test_requires 'Class::Data::Inheritable';
36
37 if (   ( exists $ENV{AGGREGATE_TESTS} && !$ENV{AGGREGATE_TESTS})
38     || (!exists $ENV{AGGREGATE_TESTS} && !can_use('Test::Aggregate', '0.34_01'))) {
39     tests join q{ },
40         grep { $_ ne 't/aggregate.t' }
41         map  { glob } qw[t/*.t t/aggregate/*.t];
42 }
43
44 if (-e 'inc/.author') {
45   build_requires 'Test::NoTabs';
46   build_requires 'Test::Pod' => 1.14;
47   build_requires 'Test::Pod::Coverage' => 1.04;
48
49   if ($^O eq 'darwin') { 
50       my $osx_ver = `/usr/bin/sw_vers -productVersion`;
51       chomp $osx_ver;
52
53       # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
54       # On 10.5 (Leopard) it wants COPYFILE_DISABLE
55       my $attr = $osx_ver eq '10.5' ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
56
57       makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
58                                         qq{ echo "You must set the ENV variable $attr to true,"; }.
59                                         ' echo "to avoid getting resource forks in your dist."; exit 255; fi' }); 
60   }
61 }
62
63 install_script glob('script/*.pl');
64 auto_install;
65 WriteAll;
66
67 print <<"EOF";
68
69  Important:
70
71     This library is for running Catalyst applications.
72
73     For development and use of catalyst.pl and myapp_create.pl, make sure
74     you also install the development tools package Catalyst::Devel.
75
76         perl -MCPANPLUS -e 'install Catalyst::Devel' # or
77         perl -MCPAN -e 'install Catalyst::Devel'
78
79     To get some commonly used plugins, as well as the TT view and DBIC 
80     model, install Task::Catalyst in the same way.
81
82  Have fun!
83 EOF