Cleanup C3 handling, require updated Class::C3::Componentised
[dbsrgits/DBIx-Class.git] / t / storage / txn_scope_guard.t
index 143f714..03985b3 100644 (file)
@@ -24,7 +24,7 @@ use DBICTest;
     });
 
    $guard->commit;
-  } qr/No such column made_up_column .*? at .*?$fn line \d+/s, "Error propogated okay";
+  } qr/No such column made_up_column .*? at .*?\Q$fn\E line \d+/s, "Error propogated okay";
 
   ok(!$artist_rs->find({name => 'Death Cab for Cutie'}), "Artist not created");
 
@@ -92,7 +92,9 @@ use DBICTest;
 
   no strict 'refs';
   no warnings 'redefine';
+
   local *{DBIx::Class::Storage::DBI::txn_rollback} = sub { die 'die die my darling' };
+  Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO;
 
   throws_ok (sub {
     my $guard = $schema->txn_scope_guard;
@@ -104,7 +106,10 @@ use DBICTest;
     #$schema->storage->_dbh( $schema->storage->_dbh->clone );
 
     die 'Deliberate exception';
-  }, qr/Deliberate exception.+Rollback failed/s);
+  }, ($] >= 5.013008 )
+    ? qr/Deliberate exception/s # temporary until we get the generic exception wrapper rolling
+    : qr/Deliberate exception.+Rollback failed/s
+  );
 
   # just to mask off warning since we could not disconnect above
   $schema->storage->_dbh->disconnect;
@@ -117,6 +122,7 @@ use DBICTest;
   no strict 'refs';
   no warnings 'redefine';
   local *{DBIx::Class::Storage::DBI::txn_rollback} = sub { die 'die die my darling' };
+  Class::C3->reinitialize() if DBIx::Class::_ENV_::OLD_MRO;
 
 #The warn from within a DESTROY callback freaks out Test::Warn, do it old-school
 =begin