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   119042 use Mojo::Base -base;
  5         320637  
  5         34  
4 5     5   807 use Carp;
  5         9  
  5         901  
5              
6             has 'class';
7             has 'str';
8              
9             sub new { ## ({class:STRING,str:STRING}) :> Dline
10 1034 100   1034 1 4124 @_ > 1
11             ? $_[0]->SUPER::new($_[1])
12             : $_[0]->SUPER::new({ class => '', str => '' })
13             }
14             sub to_html { ## () :> HTML
15 2     2 0 24 my ($self) = @_;
16 2         8 return '
'.$self->str.'
';
17             }
18              
19             1;