This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tweak change 23256 to continue passing on 5.8.x
authorNicholas Clark <nick@ccl4.org>
Thu, 20 Apr 2006 18:51:02 +0000 (18:51 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 20 Apr 2006 18:51:02 +0000 (18:51 +0000)
p4raw-id: //depot/perl@27919

lib/base/t/fields.t

index 049b29d..4d29d8d 100644 (file)
@@ -41,10 +41,9 @@ is_deeply( [sort &show_fields('Foo', fields::PRIVATE)],
 # We should get compile time failures field name typos
 eval q(return; my Foo $obj = Foo->new; $obj->{notthere} = "");
 
-my $error = $Has_PH ? 'No such(?: [\w-]+)? field "notthere"'
-                    : q[No such class field "notthere" in variable $obj ].
-                      q[of type Foo];
-like( $@, qr/^\Q$error/i );
+my $error = $Has_PH ? qr/No such(?: [\w-]+)? field "notthere"/
+    : qr/No such class field "notthere" in variable \$obj of type Foo/;
+like( $@, $error );
 
 
 foreach (Foo->new) {