Forest/Tree/Roles/HasNodeFormatter.pm

filter: Statementstmt 100% 15 / 15 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 91.3% 21 / 23 CC 2 SCAR 3.3
CC
2
Cov
94%
__ANON__
2.1
__ANON__
1.0
BEGIN
1.0
CRAP 1.4
« Forest/Tree/Writer/SimpleASCII.pm ↑ Summary Forest/Tree/Reader/SimpleTextFile.pm »
1 package Forest::Tree::Roles::HasNodeFormatter;
2 5 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 5 our $VERSION = '0.10';
5 5 our $AUTHORITY = 'cpan:STEVAN';
6  
7 has 'node_formatter' => (
8 is => 'rw',
9 isa => 'CodeRef|Str',
10 lazy => 1,
11 15 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.2
12 122 ▶ sub { (shift)->node || 'undef' }
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->node or "undef" 122 0 122
13 15 }
14 5 );
15  
16 162 ▶sub format_node {
Subroutine format_node: called CC=1 SCAR=0.0
Pod undocumented
17 162 my ( $self, $node, @args ) = @_;
18  
19 162 my $fmt = $self->node_formatter;
20  
21 162 $node->$fmt(@args);
22 }
23  
24 5 ▶no Moose::Role; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 __END__
« Forest/Tree/Writer/SimpleASCII.pm ↑ Summary Forest/Tree/Reader/SimpleTextFile.pm »