with_immutable {
is( exception {
stderr_like { Baz->new( x => 42, 'y' ) }
- qr{\QThe new() method for Baz expects a hash reference or a key/value list. You passed an odd number of arguments at t/010_basics/022_buildargs_warning.t line \E\d+},
+ qr{\QThe new() method for Baz expects a hash reference or a key/value list. You passed an odd number of arguments at $0 line \E\d+},
'warning when passing an odd number of args to new()';
stderr_unlike { Baz->new( x => 42, 'y' ) }
isa => 'Str',
);
}
- qr{\QAllowing a native trait to automatically supply a default is deprecated. You can avoid this warning by supplying a default, builder, or making the attribute required at t/010_basics/030_deprecations.t line},
+ qr{\QAllowing a native trait to automatically supply a default is deprecated. You can avoid this warning by supplying a default, builder, or making the attribute required at $0 line},
'Not providing a default for native String trait warns';
::stderr_is{ has bar => (
} q{}, 'No warning when _default_is is set';
::stderr_like{ Foo->new->bar }
- qr{\QThe bar method in the Foo class was automatically created by the native delegation trait for the bar attribute. This "default is" feature is deprecated. Explicitly set "is" or define accessor names to avoid this at t/010_basics/030_deprecations.t line},
+ qr{\QThe bar method in the Foo class was automatically created by the native delegation trait for the bar attribute. This "default is" feature is deprecated. Explicitly set "is" or define accessor names to avoid this at $0 line},
'calling a reader on a method created by a _default_is warns';
::stderr_like{ with 'Role' =>