| 1 | package MooX::ChainedAttributes::Role::GenerateAccessor; | ||||||||||
| 2 | 1 | ▶ | use 5.008001; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use strictures 2; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | our $VERSION = '0.08'; | |||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 15 | ▶ | around is_simple_set => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 9 | 15 | my $orig = shift; | |||||||||
| 10 | 15 | my $self = shift; | |||||||||
| 11 | 15 | my ($attr, $spec) = @_; | |||||||||
| 12 | return 0 | ||||||||||
| 13 | 15 | ▶ | if $spec->{chained}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 9 | $self->$orig(@_); | |||||||||
| 15 | 1 | }; | |||||||||
| 16 | |||||||||||
| 17 | 6 | ▶ | around _generate_set => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||
| 18 | 6 | my $orig = shift; | |||||||||
| 19 | 6 | my $self = shift; | |||||||||
| 20 | 6 | my ($attr, $spec) = @_; | |||||||||
| 21 | 6 | my $chained = $spec->{chained}; | |||||||||
| 22 | 6 | local $spec->{chained}; | |||||||||
| 23 | 6 | my $set = $self->$orig(@_); | |||||||||
| 24 | 6 | ▶ | return $set | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | if !$chained; | ||||||||||
| 26 | |||||||||||
| 27 | 6 | "(scalar ($set, \$_[0]))"; | |||||||||
| 28 | 1 | }; | |||||||||
| 29 | |||||||||||
| 30 | 1 | 1; | |||||||||