From: Peter Rabbitson Date: Fri, 9 Oct 2009 09:04:35 +0000 (+0000) Subject: Skip versioning test on really old perls lacking Time::HiRes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21d70f0ba25b2802becb074c134a4d433f267eef;p=dbsrgits%2FDBIx-Class-Historic.git Skip versioning test on really old perls lacking Time::HiRes --- diff --git a/t/94versioning.t b/t/94versioning.t index 03a61d3..674a855 100644 --- a/t/94versioning.t +++ b/t/94versioning.t @@ -5,7 +5,6 @@ use warnings; use Test::More; use File::Spec; use File::Copy; -use Time::HiRes qw/time sleep/; #warn "$dsn $user $pass"; my ($dsn, $user, $pass); @@ -16,6 +15,10 @@ BEGIN { plan skip_all => 'Set $ENV{DBICTEST_MYSQL_DSN}, _USER and _PASS to run this test' unless ($dsn); + eval { require Time::HiRes } + || plan skip_all => 'Test needs Time::HiRes'; + Time::HiRes->import(qw/time sleep/); + require DBIx::Class::Storage::DBI; plan skip_all => 'Test needs SQL::Translator ' . DBIx::Class::Storage::DBI->_sqlt_minimum_version