Scaffold/HierarchicalDirty.pm

filter: Statementstmt 37.0% 10 / 27 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 100% 3 / 3 totaltotal 41.4% 17 / 41 CC 12 SCAR 31.4
CC
12
Cov
32%
dirty
42.0
set_dirty
20.0
clear_dirty
20.0
CRAP 23.1
« Scaffold/Util.pm ↑ Summary Scaffold/Environment.pm »
1 2 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Class::Scaffold::HierarchicalDirty;
6 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 $Class::Scaffold::HierarchicalDirty::VERSION = '1.102280';
8 }
9  
10 # ABSTRACT: Mixin that multiplexes the dirty flag among its subobjects
11  
12 0 ▶sub dirty {
Subroutine dirty: not called CC=6 SCAR=37.4
Pod documented
13 0 my $self = shift;
14 0 for my $attr (Class::Scaffold::Accessor->factory_typed_accessors) {
15 0 ▶ return 1 if $self->$attr->dirty;
Branch: 1 branch
BranchTrueFalseTotal
if $self->$attr->dirty 0 0 0
16 }
17 0 for my $attr (Class::Scaffold::Accessor->factory_typed_array_accessors) {
18 0 for my $element ($self->$attr) {
19 0 ▶ return 1 if $element->dirty;
Branch: 1 branch
BranchTrueFalseTotal
if $element->dirty 0 0 0
20 }
21 }
22 0 return 0;
23 }
24  
25 0 ▶sub set_dirty {
Subroutine set_dirty: not called CC=4 SCAR=30.0
Pod documented
26 0 my $self = shift;
27 0 $self->$_->set_dirty for Class::Scaffold::Accessor->factory_typed_accessors;
28 0 for my $attr (Class::Scaffold::Accessor->factory_typed_array_accessors) {
29 0 for my $element ($self->$attr) {
30 0 $element->set_dirty;
31 }
32 }
33 }
34  
35 0 ▶sub clear_dirty {
Subroutine clear_dirty: not called CC=4 SCAR=30.0
Pod documented
36 0 my $self = shift;
37 $self->$_->clear_dirty
38 0 for Class::Scaffold::Accessor->factory_typed_accessors;
39 0 for my $attr (Class::Scaffold::Accessor->factory_typed_array_accessors) {
40 0 for my $element ($self->$attr) {
41 0 $element->clear_dirty;
42 }
43 }
44 }
45 2 1;
46  
47  
48 __END__
« Scaffold/Util.pm ↑ Summary Scaffold/Environment.pm »