From: Peter Rabbitson Date: Sat, 31 May 2014 09:34:29 +0000 (+0200) Subject: Call mro reinit in tests only on 5.8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc8ffd7bfc8a375545f35c8be3c224cf365ee7e7;p=dbsrgits%2FDBIx-Class-Historic.git Call mro reinit in tests only on 5.8 --- diff --git a/t/85utf8.t b/t/85utf8.t index 64b4994..e1f2cae 100644 --- a/t/85utf8.t +++ b/t/85utf8.t @@ -87,7 +87,7 @@ warnings_like ( my $schema = DBICTest->init_schema(); DBICTest::Schema::CD->load_components('UTF8Columns'); DBICTest::Schema::CD->utf8_columns('title'); -Class::C3->reinitialize(); +Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO; # as per http://search.cpan.org/dist/Test-Simple/lib/Test/More.pm#utf8 binmode (Test::More->builder->$_, ':utf8') for qw/output failure_output todo_output/; diff --git a/t/cdbi/68-inflate_has_a.t b/t/cdbi/68-inflate_has_a.t index 04abccb..246a319 100644 --- a/t/cdbi/68-inflate_has_a.t +++ b/t/cdbi/68-inflate_has_a.t @@ -18,7 +18,7 @@ DBICTest::Schema::CD->has_a( 'year', 'DateTime', inflate => sub { DateTime->new( year => shift ) }, deflate => sub { shift->year } ); -Class::C3->reinitialize; +Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO; # inflation test my $cd = $schema->resultset("CD")->find(3); diff --git a/t/inflate/serialize.t b/t/inflate/serialize.t index 30d63ec..5b1a437 100644 --- a/t/inflate/serialize.t +++ b/t/inflate/serialize.t @@ -35,7 +35,7 @@ DBICTest::Schema::Serialized->inflate_column( 'serialized', deflate => $selected->{deflater}, }, ); -Class::C3->reinitialize; +Class::C3->reinitialize if DBIx::Class::_ENV_::OLD_MRO; my $struct_hash = { a => 1, diff --git a/t/row/filter_column.t b/t/row/filter_column.t index 4720575..4aa2b28 100644 --- a/t/row/filter_column.t +++ b/t/row/filter_column.t @@ -14,7 +14,7 @@ DBICTest::Schema::Artist->filter_column(rank => { filter_from_storage => sub { $from_storage_ran++; $_[1] * 2 }, filter_to_storage => sub { $to_storage_ran++; $_[1] / 2 }, }); -Class::C3->reinitialize(); +Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO; my $artist = $schema->resultset('Artist')->create( { rank => 20 } ); @@ -143,7 +143,7 @@ IC_DIE: { DBICTest::Schema::Artist->filter_column(rank => { filter_to_storage => sub { $to_storage_ran++; $_[1] }, }); -Class::C3->reinitialize(); +Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO; ASYMMETRIC_TO_TEST: { # initialise value @@ -169,7 +169,7 @@ ASYMMETRIC_TO_TEST: { DBICTest::Schema::Artist->filter_column(rank => { filter_from_storage => sub { $from_storage_ran++; $_[1] }, }); -Class::C3->reinitialize(); +Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO; ASYMMETRIC_FROM_TEST: { # initialise value