File Coverage

blib/lib/Tree/Visualize/ASCII/Node/Parens.pm
Criterion Covered Total %
statement 16 16 100.0
branch 1 2 50.0
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 23 24 95.8


line stmt bran cond sub pod time code
1              
2             package Tree::Visualize::ASCII::Node::Parens;
3              
4 2     2   1141 use strict;
  2         3  
  2         63  
5 2     2   8 use warnings;
  2         36  
  2         47  
6              
7 2     2   9 use Tree::Visualize::Exceptions;
  2         3  
  2         86  
8              
9             our $VERSION = '0.01';
10              
11 2     2   9 use base qw(Tree::Visualize::Node::INode);
  2         3  
  2         667  
12              
13             sub draw {
14 15     15 1 17 my ($self) = @_;
15 15         38 my $node_value = $self->{tree}->getNodeValue();
16 15 50       73 ($node_value !~ /\n/)
17             || throw Tree::Visualize::IllegalOperation "node value has a newline in it, this is currently not supported.";
18 15         61 return "($node_value)";
19             }
20              
21             1;
22              
23             __END__