2 # This test is contributed by Sanko Robinson.
3 # https://rt.cpan.org/Public/Bug/Display.html?id=56837
4 # "Role application to instance with init_arg'd attributes"
6 use Test::More tests => 2;
17 (isa => 'Str', is => 'ro', init_arg => 'Name', required => 1);
21 my $tim = User->new(Name => 'Tim');
23 Admin->meta->apply($tim);
25 ok($tim->can('shutdown'),
26 'The role was successfully composed at the object level');
28 '... attribute with init_arg was re-initialized correctly');