| 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
| |||||||||||||||
| 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__ | ||||||||||||||