| 1 | package Cantella::Worker::Types; | ||
| 2 | |||
| 3 | 1 | ▶ | use MooseX::Types -declare => [ |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 'WorkerClassName' | ||
| 5 | 1 | ]; | |
| 6 | |||
| 7 | 1 | our $VERSION = '0.001001'; | |
| 8 | 1 | $VERSION = eval $VERSION; | |
| 9 | |||
| 10 | 1 | ▶ | use MooseX::Types::Moose qw/ClassName/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use Moose::Util qw/does_role/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | subtype WorkerClassName, | ||
| 14 | as ClassName, | ||
| 15 | 2 | ▶ | where { does_role($_, 'Cantella::Worker::Role::Worker') }, |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 16 | 0 | ▶ | message { "Worker class does not do role 'Cantella::Worker::Role::Worker'" }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 17 | |||
| 18 | 1 | 1; | |
| 19 | |||
| 20 | __END__; | ||