| 1 | package Moose::Meta::Method::Accessor::Native::Hash::Writer; | ||||||||||
| 2 | 7 | our $VERSION = '2.4001'; | |||||||||
| 3 | |||||||||||
| 4 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 7 | ▶ | use Class::MOP::MiniTrait; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 7 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 7 | with 'Moose::Meta::Method::Accessor::Native::Writer', | |||||||||
| 12 | 'Moose::Meta::Method::Accessor::Native::Hash', | ||||||||||
| 13 | 'Moose::Meta::Method::Accessor::Native::Collection'; | ||||||||||
| 14 | |||||||||||
| 15 | 0 | ▶ | sub _inline_coerce_new_values { | ||||||||
|
Subroutine
_inline_coerce_new_values: not called CC=3 SCAR=24.8
| |||||||||||
| 16 | 0 | my $self = shift; | |||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | return unless $self->associated_attribute->should_coerce; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | return unless $self->_tc_member_type_can_coerce; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | |||||||||||
| 22 | 0 | return <<'EOF'; | |||||||||
| 23 | if (@_) { | ||||||||||
| 24 | my %h = @_; | ||||||||||
| 25 | @h{ sort keys %h } = map { $member_coercion->($_) } @h{ sort keys %h }; | ||||||||||
| 26 | } | ||||||||||
| 27 | EOF | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub _new_members { 'values %{ { @_ } }' } | ||||||||
|
Subroutine
_new_members: not called CC=1 SCAR=6.9
| |||||||||||
| 31 | |||||||||||
| 32 | 8 | ▶ | sub _copy_old_value { | ||||||||
|
Subroutine
_copy_old_value: called CC=1 SCAR=0.0
| |||||||||||
| 33 | 8 | my $self = shift; | |||||||||
| 34 | 8 | my ($slot_access) = @_; | |||||||||
| 35 | |||||||||||
| 36 | 8 | return '{ %{ (' . $slot_access . ') } }'; | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 7 | ▶ | no Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 40 | |||||||||||
| 41 | 7 | 1; | |||||||||