MoobX/Scalar.pm

filter: Statementstmt 75.0% 9 / 12 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 63.1% 12 / 19 CC 2 SCAR 11.0
CC
2
Cov
64%
BUILD_ARGS
6.0
BEGIN
1.0
FETCH
1.0
CRAP 3.0
« MoobX.pm ↑ Summary MoobX/Array.pm »
1 package MoobX::Scalar;
2 7 our $AUTHORITY = 'cpan:YANICK';
3 # ABSTRACT: MoobX wrapper for scalar variables
4 7 $MoobX::Scalar::VERSION = '0.1.2';
5  
6 7 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 7 has value => (
9 is => 'rw',
10 writer => 'STORE',
11 );
12  
13 26 ▶sub FETCH { $_[0]->value }
Subroutine FETCH: called CC=1 SCAR=0.0
14  
15 0 ▶sub BUILD_ARGS {
Subroutine BUILD_ARGS: not called CC=2 SCAR=17.9
Pod undocumented
16 0 my( $class, @args ) = @_;
17  
18 0 ▶ unshift @args, 'value' if @args == 1;
Branch: 1 branch
BranchTrueFalseTotal
if @args == 1 0 0 0
19  
20 0 return { @args }
21 }
22  
23 9 ▶sub TIESCALAR { $_[0]->new( value => $_[1]) }
Subroutine TIESCALAR: called CC=1 SCAR=0.0
24  
25 7 1;
26  
27 __END__
« MoobX.pm ↑ Summary MoobX/Array.pm »