| 1 | package MoobX::Array::Observable; | ||||||||||
| 2 | 6 | our $AUTHORITY = 'cpan:YANICK'; | |||||||||
| 3 | 6 | $MoobX::Array::Observable::VERSION = '0.1.2'; | |||||||||
| 4 | 6 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 6 | ▶ | use experimental 'postderef', 'signatures'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 6 | ▶ | use Scalar::Util 'refaddr'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 106 | ▶ | before [ qw/ FETCH FETCHSIZE /] => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 11 | 106 | my $self = shift; | |||||||||
| 12 | 106 | ▶ | push @MoobX::DEPENDENCIES, $self if $MoobX::WATCHING; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 6 | }; | |||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | 61 | ▶ | after [ qw/ STORE PUSH CLEAR /] => sub { | ||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||
| 17 | 61 | my $self = shift; | |||||||||
| 18 | 61 | for my $i ( 0.. $self->value->$#* ) { | |||||||||
| 19 | 124 | ▶ | next if tied $self->value->[$i]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 124 | ▶ | next unless ref $self->value->[$i]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 12 | MoobX::observable_ref( $self->value->[$i] ); | |||||||||
| 22 | } | ||||||||||
| 23 | 61 | MoobX::observable_modified( $self ); | |||||||||
| 24 | 6 | }; | |||||||||
| 25 | |||||||||||
| 26 | |||||||||||
| 27 | |||||||||||
| 28 | 6 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||