| 1 | 8 | ▶ | use 5.014; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | package Kavorka::TraitFor::Parameter::optional; | ||||||||||
| 6 | |||||||||||
| 7 | 8 | our $AUTHORITY = 'cpan:TOBYINK'; | |||||||||
| 8 | 8 | our $VERSION = '0.039'; | |||||||||
| 9 | |||||||||||
| 10 | 8 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | around _injection_default_value => sub | ||||||||||
| 13 | 70 | ▶ | { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 14 | 70 | my $next = shift; | |||||||||
| 15 | 70 | my $self = shift; | |||||||||
| 16 | 70 | ▶ | @_ = ('undef') unless @_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 70 | $self->$next(@_); | |||||||||
| 18 | 8 | }; | |||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | after sanity_check => sub | ||||||||||
| 22 | 35 | ▶ | { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.1
| |||||||||||
| 23 | 35 | my $self = shift; | |||||||||
| 24 | 35 | my $name = $self->name; | |||||||||
| 25 | 35 | ▶ | croak("Bad parameter $name") if $self->invocant; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 8 | }; | |||||||||
| 27 | |||||||||||
| 28 | 8 | 1; | |||||||||