Forest/Tree/Writer/SimpleHTML.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 26 / 26 CC 3 SCAR 6.9
CC
3
Cov
100%
__ANON__
3.0
BEGIN
1.0
as_string
1.0
CRAP 2.0
« Forest/Tree/Roles/LoadWithMetaData.pm ↑ Summary Forest/Tree/Indexer/SimpleUIDIndexer.pm »
1 package Forest::Tree::Writer::SimpleHTML;
2 4 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 4 our $VERSION = '0.10';
5 4 our $AUTHORITY = 'cpan:STEVAN';
6  
7 4 with 'Forest::Tree::Writer',
8 'Forest::Tree::Roles::HasNodeFormatter';
9  
10 5 ▶sub as_string {
Subroutine as_string: called CC=1 SCAR=0.0
Pod documented
11 5 my ($self) = @_;
12  
13 110 return join( "", map { "$_\n" }
14 55 ▶ $self->tree->fmap_cont(sub {
Subroutine __ANON__: called CC=3 SCAR=11.0
15 55 my ( $t, $cont, %args ) = @_;
16  
17 return (
18 ( $t->has_node ? ( '<li>' . $self->format_node($t) . '</li>' ) : () ),
19 55 ▶ ( $t->child_count ? ( '<ul>', ( map { " $_" } $cont->() ), '</ul>' ) : () ),
Branch: 2 branches
BranchTrueFalseTotal
$t->has_node ? : 50 5 55
$t->child_count ? : 30 25 55
20 );
21 5 }),
22 );
23 }
24  
25 4 __PACKAGE__->meta->make_immutable;
26  
27 4 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 __END__
« Forest/Tree/Roles/LoadWithMetaData.pm ↑ Summary Forest/Tree/Indexer/SimpleUIDIndexer.pm »