Commit | Line | Data |
6cfa1e5e |
1 | #!/usr/bin/perl |
fde8e43f |
2 | # This is automatically generated by author/import-moose-test.pl. |
3 | # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!! |
4 | use t::lib::MooseCompat; |
6cfa1e5e |
5 | use strict; |
6 | use warnings; |
7 | |
fde8e43f |
8 | use Test::More; |
6cfa1e5e |
9 | |
10 | # test role and class |
11 | package SomeRole; |
12 | use Mouse::Role; |
13 | |
14 | requires 'foo'; |
15 | |
16 | package SomeClass; |
17 | use Mouse; |
18 | has 'foo' => (is => 'rw'); |
19 | with 'SomeRole'; |
20 | |
21 | package main; |
22 | |
23 | #my $c = SomeClass->new; |
24 | #isa_ok( $c, 'SomeClass'); |
25 | |
26 | for my $modifier_type (qw[ before around after ]) { |
27 | my $get_func = "get_${modifier_type}_method_modifiers"; |
28 | my @mms = eval{ SomeRole->meta->$get_func('foo') }; |
29 | is($@, '', "$get_func for no method mods does not die"); |
30 | is(scalar(@mms),0,'is an empty list'); |
31 | } |
fde8e43f |
32 | |
33 | done_testing; |