This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexp_unicode_prop.t: Improve output
[perl5.git] / t / re / regexp_unicode_prop.t
index 54a2e7e..a36afdf 100644 (file)
@@ -202,13 +202,15 @@ sub match {
     }
 
     undef $@;
-    my $match_pat = eval "qr/$match/$caseless";
-    is($@, '', "$name compiled correctly to a regexp");
+    my $pat = "qr/$match/$caseless";
+    my $match_pat = eval $pat;
+    is($@, '', "$pat compiled correctly to a regexp: $@");
     like($str, $match_pat, "$name correctly matched");
 
     undef $@;
-    my $nomatch_pat = eval "qr/$nomatch/$caseless";
-    is($@, '', "$name compiled correctly to a regexp");
+    $pat = "qr/$nomatch/$caseless";
+    my $nomatch_pat = eval $pat;
+    is($@, '', "$pat compiled correctly to a regexp: $@");
     unlike($str, $nomatch_pat, "$name correctly did not match");
 }