| 1 | package Forest::Tree::Writer::SimpleASCII; | ||||||||||
| 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 | 12 | ▶ | sub as_string { | ||||||||
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 11 | 12 | my ($self) = @_; | |||||||||
| 12 | 12 | my $out; | |||||||||
| 13 | |||||||||||
| 14 | 90 | return join( "", map { "$_\n" } | |||||||||
| 15 | 102 | ▶ | $self->tree->fmap_cont(sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 16 | 102 | my ( $t, $cont, %args ) = @_; | |||||||||
| 17 | |||||||||||
| 18 | 102 | ▶ | if ( $t->has_node ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | return ( | ||||||||||
| 20 | $self->format_node($t), | ||||||||||
| 21 | 90 | map { " $_" } $cont->(), | |||||||||
| 22 | ); | ||||||||||
| 23 | } else { | ||||||||||
| 24 | 12 | return $cont->(); | |||||||||
| 25 | } | ||||||||||
| 26 | 12 | }), | |||||||||
| 27 | ); | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 4 | __PACKAGE__->meta->make_immutable; | |||||||||
| 31 | |||||||||||
| 32 | 4 | ▶ | no Moose; 1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||