MoobX/Scalar/Observable.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 27 / 27 CC 3 SCAR 4.5
CC
3
Cov
100%
__ANON__
2.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.6
« MoobX/Trait/Observable.pm ↑ Summary MoobX/Observer.pm »
1 package MoobX::Scalar::Observable;
2 7 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: Observable role for MobX scalars
4 7 $MoobX::Scalar::Observable::VERSION = '0.1.2';
5  
6 7 ▶use 5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 7 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 7 ▶use Scalar::Util 'refaddr';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 26 ▶before 'FETCH' => sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
13 26 my $self = shift;
14 26 ▶ push @MoobX::DEPENDENCIES, $self if $MoobX::WATCHING;
Branch: 1 branch
BranchTrueFalseTotal
if $MoobX::WATCHING 22 4 26
15 7 };
16  
17 27 ▶after 'STORE' => sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
18 27 my $self = shift;
19
20 27 ▶ MoobX::observable_ref($self->value) if ref $self->value;
Branch: 1 branch
BranchTrueFalseTotal
if ref $self->value 2 25 27
21 27 MoobX::observable_modified( $self );
22 7 };
23  
24 7 1;
25  
26 __END__
« MoobX/Trait/Observable.pm ↑ Summary MoobX/Observer.pm »