Commits

Toby Inkster committed fff6346

explicit line numbering

Comments (0)

Files changed (1)

 use Test::Warn;
 use Test::More;
 
-{
+eval q {
+# line 1 "embedded"
 	package Foo;
 	use Moo;
 	use MooX::late;
 	has foo => (is => 'ro', isa => 'X Y Z', required => 0);
-}
+};
 
 # type constraint should not be checked, so no warning expected
 warnings_are {
 # But this should warn
 warnings_like {
 	my $foo = Foo->new(foo => 1);
-} qr{Type constraint 'X Y Z' not fully enforced \(defined at .+/03invalid_tc\.t:10, package Foo\)};
+} qr{Type constraint 'X Y Z' not fully enforced \(defined at embedded:4, package Foo\)};
 
 # But we shouldn't get the same warning again. Too much noise!
 warnings_are {