Commit | Line | Data |
6cfa1e5e |
1 | #!/usr/bin/perl |
2 | use strict; |
3 | use warnings; |
4 | |
5 | use Test::More tests => 6; |
6 | |
7 | # test role and class |
8 | package SomeRole; |
9 | use Mouse::Role; |
10 | |
11 | requires 'foo'; |
12 | |
13 | package SomeClass; |
14 | use Mouse; |
15 | has 'foo' => (is => 'rw'); |
16 | with 'SomeRole'; |
17 | |
18 | package main; |
19 | |
20 | #my $c = SomeClass->new; |
21 | #isa_ok( $c, 'SomeClass'); |
22 | |
23 | for my $modifier_type (qw[ before around after ]) { |
24 | my $get_func = "get_${modifier_type}_method_modifiers"; |
25 | my @mms = eval{ SomeRole->meta->$get_func('foo') }; |
26 | is($@, '', "$get_func for no method mods does not die"); |
27 | is(scalar(@mms),0,'is an empty list'); |
28 | } |