From: Ash Berlin Date: Tue, 11 Mar 2008 14:29:33 +0000 (+0000) Subject: Fix depend on Time::Piece for cdbi X-Git-Tag: v0.08240~537 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=09d4665712573998bf9e38f72337a7ef9a4f4543;p=dbsrgits%2FDBIx-Class.git Fix depend on Time::Piece for cdbi --- diff --git a/Makefile.PL b/Makefile.PL index 898ea91..67f1167 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -33,6 +33,8 @@ tests "t/*.t t/*/*.t"; if( -e 'inc/.author' ) { build_requires 'DBIx::ContextualFetch'; build_requires 'Class::Trigger'; + build_requires 'Time::Piece'; + system('pod2text lib/DBIx/Class.pm > README'); } @@ -41,3 +43,28 @@ auto_provides; auto_install; WriteAll; + + +if ($Module::Install::AUTHOR) { + # Need to do this _after_ WriteAll else it looses track of them + Meta->{values}{build_requires} = [ grep { + $_->[0] !~ / + DBIx::ContextualFetch | + Class::Trigger | + Time::Piece + /x; + } @{Meta->{values}{build_requires}} ]; + + my @scalar_keys = Module::Install::Metadata::Meta_TupleKeys(); + sub Module::Install::Metadata::Meta_TupleKeys { + return @scalar_keys, 'resources'; + } + Meta->{values}{resources} = [ + [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class' ], + [ 'IRC', 'irc://irc.perl.org/#dbix-class' ], + ]; + Meta->write; +} + + + diff --git a/t/cdbi-t/24-meta_info.t b/t/cdbi-t/24-meta_info.t index 6236a17..24c4c74 100644 --- a/t/cdbi-t/24-meta_info.t +++ b/t/cdbi-t/24-meta_info.t @@ -1,6 +1,11 @@ #!/usr/bin/perl -w use strict; +BEGIN { + eval "require Time::Piece"; + use Test::More skip_all => "Time::Piece required for this test"; +} + use Test::More tests => 12; use Test::Warn;