File Coverage

lib/Book/Bilingual/Dline.pm
Criterion Covered Total %
statement 9 9 100.0
branch 2 2 100.0
condition n/a
subroutine 4 4 100.0
pod 1 2 50.0
total 16 17 94.1


line stmt bran cond sub pod time code
1             package Book::Bilingual::Dline;
2             # ABSTRACT: A dual language line
3 5     5   118013 use Mojo::Base -base;
  5         323877  
  5         32  
4 5     5   894 use Carp;
  5         8  
  5         862  
5              
6             has 'class';
7             has 'str';
8              
9             sub new { ## ({class:STRING,str:STRING}) :> Dline
10 1034 100   1034 1 3877 @_ > 1
11             ? $_[0]->SUPER::new($_[1])
12             : $_[0]->SUPER::new({ class => '', str => '' })
13             }
14             sub to_html { ## () :> HTML
15 2     2 0 27 my ($self) = @_;
16 2         9 return '
'.$self->str.'
';
17             }
18              
19             1;