1#!perl -w
2use strict;
3use Test::More;
4{
5    package Role;
6    use Mouse::Role;
7
8    has foo => (
9        is       => 'bare',
10        init_arg => undef,
11    );
12
13    package Class;
14    use Mouse;
15    with 'Role';
16
17    has "+foo" => (
18        default => 'bar',
19    );
20
21    ::ok( __PACKAGE__->meta->find_attribute_by_name('foo')->has_default );
22}
23
24my $foo = Class->meta->get_attribute('foo');
25ok $foo;
26is $foo->name, 'foo';
27is $foo->init_arg, undef;
28is $foo->default, 'bar';
29
30done_testing;
31
32