Fix test failure on 5.8.x with DBIC_TRACE=1 (introduced by 68b8ba54)
[dbsrgits/DBIx-Class.git] / t / storage / debug.t
index ccf7feb..6868795 100644 (file)
@@ -71,11 +71,12 @@ my $exception = try {
   open(STDERR, '>&STDERRCOPY');
 };
 
-like $exception, qr/
+ok $exception =~ /
   \QDuplication of STDERR for debug output failed (perhaps your STDERR is closed?)\E
     .+
   \Qat @{[__FILE__]} line $exception_line_number\E$
-/xms;
+/xms
+  or diag "Unexpected exception text:\n\n$exception\n";
 
 my @warnings;
 $exception = try {