File Coverage

blib/lib/SpeL/Object/Subscript.pm
Criterion Covered Total %
statement 20 20 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 29 29 100.0


line stmt bran cond sub pod time code
1             # -*- cperl -*-
2             # ABSTRACT: LaTeX subscript object
3              
4              
5             package SpeL::Object::Subscript;
6              
7 41     41   318 use SpeL::Object::MathGroup;
  41         87  
  41         2293  
8              
9 41     41   303 use SpeL::I18n;
  41         89  
  41         1444  
10              
11 41     41   213 use parent 'Exporter';
  41         96  
  41         247  
12 41     41   2501 use Carp;
  41         94  
  41         2921  
13              
14 41     41   246 use Data::Dumper;
  41         71  
  41         6633  
15              
16              
17              
18             sub read {
19 59     59 1 104 my $self = shift;
20 59         123 my ( $level ) = @_;
21              
22 59 100       157 if ( defined $self->{Lit} ) {
23 55         229 return ' "' . $self->{Lit} . '"';
24             }
25             else {
26 4         28 return ' ' . $self->{Group}->read( $level + 1 );
27             }
28             }
29              
30             1;
31              
32             __END__