| 1 | package Bread::Board::BlockInjection; | ||
| 2 | 59 | our $AUTHORITY = 'cpan:STEVAN'; | |
| 3 | # ABSTRACT: service instantiated via custom subroutine | ||
| 4 | 59 | $Bread::Board::BlockInjection::VERSION = '0.37'; | |
| 5 | 59 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 59 | with 'Bread::Board::Service::WithParameters', | |
| 8 | 'Bread::Board::Service::WithDependencies', | ||
| 9 | 'Bread::Board::Service::WithClass'; | ||
| 10 | |||
| 11 | 59 | has 'block' => ( | |
| 12 | is => 'rw', | ||
| 13 | isa => 'CodeRef', | ||
| 14 | required => 1, | ||
| 15 | ); | ||
| 16 | |||
| 17 | |||
| 18 | 53 | ▶ | sub get { |
|
Subroutine
get: called CC=1 SCAR=0.0
| |||
| 19 | 53 | my $self = shift; | |
| 20 | 53 | $self->block->($self) | |
| 21 | } | ||
| 22 | |||
| 23 | 59 | __PACKAGE__->meta->make_immutable; | |
| 24 | |||
| 25 | 59 | ▶ | no Moose; 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | |||
| 27 | __END__ | ||