7 'Test::Output' => '0.01', # skip all if not installed
22 my $foo_meta = Foo->meta;
24 sub { $foo_meta->add_attribute( a => ( reader => 'get_a' ) ) },
25 qr/^You are overwriting a locally defined method \(get_a\) with an accessor/,
26 'reader overriding gives proper warning'
29 sub { $foo_meta->add_attribute( b => ( writer => 'set_b' ) ) },
30 qr/^You are overwriting a locally defined method \(set_b\) with an accessor/,
31 'writer overriding gives proper warning'
34 sub { $foo_meta->add_attribute( c => ( predicate => 'has_c' ) ) },
35 qr/^You are overwriting a locally defined method \(has_c\) with an accessor/,
36 'predicate overriding gives proper warning'
39 sub { $foo_meta->add_attribute( d => ( clearer => 'clear_d' ) ) },
40 qr/^You are overwriting a locally defined method \(clear_d\) with an accessor/,
41 'clearer overriding gives proper warning'
44 sub { $foo_meta->add_attribute( e => ( is => 'rw' ) ) },
45 qr/^You are overwriting a locally defined method \(e\) with an accessor/,
46 'accessor overriding gives proper warning'
49 sub { $foo_meta->add_attribute( has => ( is => 'rw' ) ) },
50 qr/^You are overwriting a locally defined function \(has\) with an accessor/,
51 'function overriding gives proper warning'