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