$bar->foo(100);
is($bar->foo, 100, "... can change the attribute's value to an Int");
-like( exception { $bar->foo("baz") }, qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Int' with value .*baz.* at / );
+like( exception { $bar->foo("baz") }, qr/^Attribute \(foo\) does not pass the type constraint because: Validation failed for 'Int' with value .*baz.*/ );
is($bar->foo, 100, "... still has the old Int value");
$baz->baz('Foo');
is($baz->baz, 'Foo', "... can change the attribute's value to a ClassName");
-like( exception { $baz->baz("zonk") }, qr/^Attribute \(baz\) does not pass the type constraint because: Validation failed for 'ClassName\|Int' with value .*zonk.* at / );
+like( exception { $baz->baz("zonk") }, qr/^Attribute \(baz\) does not pass the type constraint because: Validation failed for 'ClassName\|Int' with value .*zonk.*/ );
is_deeply($baz->baz, 'Foo', "... still has the old ClassName value");
$quux->quux(["hi"]);
is_deeply($quux->quux, ["hi"], "... can change the attribute's value to an ArrayRef");
-like( exception { $quux->quux("quux") }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .*quux.* at / );
+like( exception { $quux->quux("quux") }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .*quux.*/ );
is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value");
-like( exception { $quux->quux({a => 1}) }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .+ at / );
+like( exception { $quux->quux({a => 1}) }, qr/^Attribute \(quux\) does not pass the type constraint because: Validation failed for 'ArrayRef\|Positive' with value .+/ );
is_deeply($quux->quux, ["hi"], "... still has the old ArrayRef value");
::like(
::exception { with 'Bar' },
- qr/^\Q'Bar' requires the method 'bar' to be implemented by 'Class' at/,
+ qr/^\Q'Bar' requires the method 'bar' to be implemented by 'Class'/,
"requirement isn't imported, so don't give the extra info in the error"
);
}