8 'Test::Output' => '0.01',
24 ::stderr_like{ has foo => (
30 qr/\QAllowing a native trait to automatically supply a default is deprecated/,
31 'Not providing a default for native String trait warns';
33 ::stderr_like{ has bar => (
39 qr/\QAllowing a native trait to automatically supply a value for "is" is deprecated/,
40 'Not providing a value for is with native String trait warns';
42 ::stderr_like{ with 'Role' =>
43 { excludes => ['thing'], alias => { thing => 'thing2' } };
45 qr/\QThe alias and excludes options for role application have been renamed -alias and -excludes/,
46 'passing excludes or alias with a leading dash warns';
48 !Foo->meta->has_method('thing'),
49 'thing method is excluded from role application'
52 Foo->meta->has_method('thing2'),
53 'thing2 method is created as alias in role application'
62 ::stderr_is{ has foo => (
69 'Providing a reader for a String trait avoids default is warning';
71 ::lives_and{ ::stderr_is{ has bar => (
75 builder => '_build_foo',
78 'Providing a builder for a String trait avoids default default warning';
79 } 'Providing a builder for a String trait does not die';
89 ::stderr_is{ has foo => (
96 'Providing a writer for a String trait avoids default is warning';
98 ::stderr_is{ has bar => (
105 'Making a String trait required avoids default default warning';
115 ::stderr_is{ has foo => (
116 traits => ['String'],
122 'Providing an accessor for a String trait avoids default is warning';
124 ::lives_and{ ::stderr_is{ has bar => (
125 traits => ['String'],
131 'Making a String trait lazy_build avoids default default warning';
132 } 'Providing lazy_build for a String trait lives';