Call mro reinit in tests only on 5.8
Peter Rabbitson [Sat, 31 May 2014 09:34:29 +0000 (11:34 +0200)]
t/85utf8.t
t/cdbi/68-inflate_has_a.t
t/inflate/serialize.t
t/row/filter_column.t

index 64b4994..e1f2cae 100644 (file)
@@ -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/;
index 04abccb..246a319 100644 (file)
@@ -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);
index 30d63ec..5b1a437 100644 (file)
@@ -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,
index 4720575..4aa2b28 100644 (file)
@@ -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