X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=910e7fdf6e6e669ac3db58499940b1039406b434;hb=cf810cad22438b454cd7cb01bcd4836fa2343569;hp=3c1ba129a26ea7ee21ca39334822ff2d9e14bd68;hpb=52d05eb578fb19f0e04e08436edc4ba1d659db79;p=catagits%2FGitalist.git diff --git a/Makefile.PL b/Makefile.PL index 3c1ba12..910e7fd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,9 +4,11 @@ use strict; use warnings; use inc::Module::Install 0.91; -use Module::Install::AuthorRequires; -use Module::Install::AuthorTests; -use Module::Install::ReadmeFromPod; +if ($ENV{GITALIST_RELEASE_TESTING}) { + require Module::Install::AuthorRequires; + require Module::Install::AuthorTests; + require Module::Install::ReadmeFromPod; +} name 'Gitalist'; all_from 'lib/Gitalist.pm'; @@ -16,8 +18,7 @@ author 'Dan Brook '; license 'gpl2'; -# Want trunk for FCGI to work correctly.. -requires 'Catalyst::Runtime' => '5.80014'; +requires 'Catalyst::Runtime' => '5.8001402'; requires 'Catalyst::Plugin::ConfigLoader'; requires 'Catalyst::Plugin::StackTrace'; requires 'Catalyst::Plugin::Static::Simple'; @@ -34,7 +35,7 @@ requires 'Config::General'; requires 'Moose'; requires 'Moose::Autobox'; -requires 'MooseX::Declare'; +requires 'MooseX::Declare' => '0.32'; requires 'MooseX::Types::Common'; requires 'MooseX::Types::Path::Class'; requires 'MooseX::Types'; @@ -47,7 +48,6 @@ requires 'CGI'; requires 'DateTime'; requires 'DateTime::Format::Mail'; requires 'File::Copy::Recursive'; -requires 'File::Stat::ModeString'; requires 'File::Which'; requires 'HTML::Entities'; requires 'IPC::Run'; @@ -60,15 +60,61 @@ requires 'XML::Atom'; requires 'XML::RSS'; requires 'XML::OPML::SimpleGen'; -author_requires 'Test::NoTabs'; -author_requires 'Test::Pod' => '1.14'; -author_requires 'Test::Pod::Coverage' => '1.04'; - test_requires 'Test::More' => '0.88'; +test_requires 'Test::utf8' => '0.02'; + +resources bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Gitalist'; +resources repository => 'git://git.shadowcat.co.uk/catagits/Gitalist.git'; catalyst; -author_tests 't/author'; +if ($ENV{GITALIST_RELEASE_TESTING}) { + author_tests 't/author'; + author_requires 'Test::NoTabs'; + author_requires 'Test::Pod' => '1.14'; + author_requires 'Test::Pod::Coverage' => '1.04'; +} + install_script glob('script/*.pl'); auto_install; + +if ($Module::Install::AUTHOR && $ENV{GITALIST_RELEASE_TESTING}) { + # This is totally gross :) + # However, it is also much more effective than Module::Install::ProvidesClass + # which a) just does not work very well for us, b) totally won't install from + # cpan right now.. + author_requires 'Module::Find'; + author_requires 'B::Hooks::OP::Check::StashChange'; + author_requires 'B::Compiling'; + require Module::Find; + require B::Hooks::OP::Check::StashChange; + require B::Compiling; + require FindBin; + require lib; + + my $libdir = "$FindBin::Bin/lib"; + lib->import($libdir); + + my %packages; + + our $id = B::Hooks::OP::Check::StashChange::register(sub { + my ($new, $old) = @_; + my $file = B::Compiling::PL_compiling()->file; + return unless $file =~ s/^$libdir/lib/; + $packages{$new} ||= $file + if $new =~ /^Gitalist/; + }); + + require Gitalist; + Module::Find::useall(qw/Gitalist/); + undef $id; + + no strict 'refs'; + provides($_ => { + file => $packages{$_}, + ${$_.'::VERSION'} ? ( version => $_->VERSION() ) : () + }) for keys %packages; +} + WriteAll; +