From: Matt S Trout Date: Tue, 21 Aug 2007 19:52:09 +0000 (+0000) Subject: force CDBICompat deps for developers, fix tests to work with latest Class::Trigger X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1543db24f266ac56443d504e126c2273b06d6d5c;p=dbsrgits%2FDBIx-Class-Historic.git force CDBICompat deps for developers, fix tests to work with latest Class::Trigger --- diff --git a/Makefile.PL b/Makefile.PL index 1e84a29..67326b5 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -29,9 +29,11 @@ install_script 'script/dbicadmin'; tests "t/*.t t/*/*.t"; -# re-build README if we're in an svk checkout -if( -e 'MANIFEST.SKIP' ) { - system('pod2text lib/DBIx/Class.pm > README'); +# re-build README and require CDBI modules for testing if we're in a checkout +if( -e 'inc/.author' ) { + build_requires 'DBIx::ContextualFetch'; + build_requires 'Class::Trigger'; + system('pod2text lib/DBIx/Class.pm > README'); } auto_provides; diff --git a/t/cdbi-t/11-triggers.t b/t/cdbi-t/11-triggers.t index 5626763..f25957c 100644 --- a/t/cdbi-t/11-triggers.t +++ b/t/cdbi-t/11-triggers.t @@ -25,13 +25,11 @@ sub pst_up_trigger { ::ok(1, "Running post-update trigger"); } sub default_rating { $_[0]->Rating(15); } -Film->add_trigger( - before_create => \&default_rating, - after_create => \&create_trigger2, - after_delete => \&delete_trigger, - before_update => \&pre_up_trigger, - after_update => \&pst_up_trigger, -); +Film->add_trigger(before_create => \&default_rating); +Film->add_trigger(after_create => \&create_trigger2); +Film->add_trigger(after_delete => \&delete_trigger); +Film->add_trigger(before_update => \&pre_up_trigger); +Film->add_trigger(after_update => \&pst_up_trigger); ok( my $ver = Film->create({