File Coverage

blib/lib/SpeL/Object/Element.pm
Criterion Covered Total %
statement 52 53 98.1
branch 6 12 50.0
condition n/a
subroutine 14 14 100.0
pod 1 1 100.0
total 73 80 91.2


line stmt bran cond sub pod time code
1             # -*- cperl -*-
2             # ABSTRACT: LaTeX element object
3              
4              
5             package SpeL::Object::Element;
6              
7 41     41   18536 use SpeL::Object::VerbatimEnvironment;
  41         124  
  41         1917  
8 41     41   17346 use SpeL::Object::Environment;
  41         136  
  41         1916  
9 41     41   18894 use SpeL::Object::Group;
  41         166  
  41         1916  
10 41     41   18556 use SpeL::Object::MathInline;
  41         152  
  41         1780  
11 41     41   633 use SpeL::Object::MathEnvironment;
  41         98  
  41         1937  
12 41     41   647 use SpeL::Object::Item;
  41         72  
  41         1231  
13 41     41   226 use SpeL::Object::Command;
  41         126  
  41         1205  
14 41     41   682 use SpeL::Object::TokenSequence;
  41         80  
  41         1279  
15 41     41   221 use SpeL::Object::Variable;
  41         73  
  41         1202  
16 41     41   189 use SpeL::Object::Realnumber;
  41         77  
  41         2133  
17              
18 41     41   312 use parent 'Exporter';
  41         83  
  41         206  
19 41     41   2344 use Carp;
  41         83  
  41         2161  
20              
21 41     41   204 use Data::Dumper;
  41         76  
  41         12726  
22              
23              
24              
25              
26             sub read {
27 1     1 1 3 my $self = shift;
28 1         3 my ( $level ) = @_;
29              
30 1 50       24 exists $self->{sup} and return '^';
31 1 50       4 exists $self->{sub} and return '_';
32 1 50       5 exists $self->{smallspace} and return ' ';
33 1 50       3 exists $self->{percent} and return $SpeL::I18n::lh->maketext( '%' );
34 1 50       4 exists $self->{eol} and return "\n";
35 1 50       4 if ( exists $self->{Docstrip} ) {
36 1         4 $self->{Docstrip} =~ s/\./ dot /g;
37 1         4 $self->{Docstrip} =~ s/::/ double colon /g;
38 1         3 $self->{Docstrip} =~ s/:/ colon /g;
39 1         3 $self->{Docstrip} =~ s/;/ semicolon /g;
40 1         6 return $self->{Docstrip};
41             }
42            
43 0           return "Error when reading Element|" . $self->{''} . "|";
44             }
45              
46             1;
47              
48             __END__