From: Gordon Irving Date: Tue, 15 Dec 2009 22:18:35 +0000 (+0000) Subject: add deps check for 89dbicadmin.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f305b8f01c307042450e880dde27c0bf70fa09da;p=dbsrgits%2FDBIx-Class-Historic.git add deps check for 89dbicadmin.t --- diff --git a/t/89dbicadmin.t b/t/89dbicadmin.t index 0a9666b..4d193ef 100644 --- a/t/89dbicadmin.t +++ b/t/89dbicadmin.t @@ -7,15 +7,22 @@ use lib qw(t/lib); use DBICTest; -eval 'require JSON::Any'; -plan skip_all => 'Install JSON::Any to run this test' if ($@); +BEGIN { + eval "require DBIx::Class::Admin"; + plan skip_all => "Deps not installed: $@" if $@; -eval 'require Text::CSV_XS'; -if ($@) { - eval 'require Text::CSV_PP'; - plan skip_all => 'Install Text::CSV_XS or Text::CSV_PP to run this test' if ($@); -} + eval "require Getopt::Long::Descriptive"; + plan skip_all => 'Install Getopt::Long::Descriptive to run this test' if ($@); + + eval 'require JSON::Any'; + plan skip_all => 'Install JSON::Any to run this test' if ($@); + eval 'require Text::CSV_XS'; + if ($@) { + eval 'require Text::CSV_PP'; + plan skip_all => 'Install Text::CSV_XS or Text::CSV_PP to run this test' if ($@); + } +} my @json_backends = qw/XS JSON DWIW/; my $tests_per_run = 5;