blob: aa659f75c3b8f505a2a7b01214ebf4e1815bc5fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use strict;
use warnings;
use Test::More;
use Test::Requires 'Test::Output';
{
package Bar;
use Moose;
has has_attr => (
is => 'ro',
);
::stderr_like{ has attr => (
is => 'ro',
predicate => 'has_attr',
)
}
qr/\QYou are overwriting an accessor (has_attr) for the has_attr attribute with a new accessor method for the attr attribute/,
'overwriting an accessor for another attribute causes a warning';
}
done_testing;
|