| 1 | |||
| 2 | package Clio::Role::HasManager; | ||
| 3 | 8 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 8 | $Clio::Role::HasManager::AUTHORITY = 'cpan:AJGB'; | |
| 5 | } | ||
| 6 | { | ||
| 7 | 8 | $Clio::Role::HasManager::VERSION = '0.02'; | |
| 8 | } | ||
| 9 | # ABSTRACT: Role for providing manager object | ||
| 10 | |||
| 11 | 8 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 8 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | |||
| 15 | 8 | has 'manager' => ( | |
| 16 | is => 'ro', | ||
| 17 | required => 1, | ||
| 18 | ); | ||
| 19 | |||
| 20 | |||
| 21 | has 'log' => ( | ||
| 22 | is => 'ro', | ||
| 23 | init_arg => undef, | ||
| 24 | lazy => 1, | ||
| 25 | 0 | ▶ | default => sub { |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 26 | 0 | $_[0]->manager->c->log( ref $_[0] ); | |
| 27 | } | ||
| 28 | 8 | ); | |
| 29 | |||
| 30 | |||
| 31 | 8 | 1; | |
| 32 | |||
| 33 | |||
| 34 | __END__ | ||