Commit | Line | Data |
---|---|---|
977a86ba | 1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
a28e50e4 | 6 | use Test::More; |
b10dde3a | 7 | use Test::Fatal; |
977a86ba | 8 | |
7ff56534 | 9 | |
977a86ba | 10 | { |
11 | package My::Role; | |
12 | use Moose::Role; | |
13 | } | |
14 | { | |
15 | package My::Class; | |
16 | use Moose; | |
d03bd989 | 17 | |
b10dde3a | 18 | ::like( ::exception { |
977a86ba | 19 | extends 'My::Role'; |
b10dde3a | 20 | }, qr/You cannot inherit from a Moose Role \(My\:\:Role\)/, '... this croaks correctly' ); |
977a86ba | 21 | } |
a28e50e4 | 22 | |
23 | done_testing; |