File Coverage

blib/lib/SpeL/Object/ElementList.pm
Criterion Covered Total %
statement 33 33 100.0
branch 2 2 100.0
condition n/a
subroutine 10 10 100.0
pod 2 2 100.0
total 47 47 100.0


line stmt bran cond sub pod time code
1             # -*- cperl -*-
2             # ABSTRACT: LaTeX elementlist object
3              
4              
5 41     41   275 use strict;
  41         81  
  41         1594  
6 41     41   236 use warnings;
  41         362  
  41         2565  
7             package SpeL::Object::ElementList;
8              
9 41     41   898 use parent 'Exporter';
  41         659  
  41         349  
10 41     41   2803 use Carp;
  41         71  
  41         2713  
11              
12 41     41   19191 use SpeL::Object::Element;
  41         206  
  41         2156  
13 41     41   900 use SpeL::Object::MathGroup;
  41         83  
  41         1401  
14 41     41   19256 use SpeL::Object::MathEnvironmentSimple;
  41         152  
  41         2023  
15              
16 41     41   239 use SpeL::I18n;
  41         74  
  41         6335  
17              
18             #use Data::Dumper;
19              
20              
21             sub new {
22 2696     2696 1 6226 my $class = shift;
23 2696         6421 my ( $self ) = @_;
24 2696 100       8350 $self = {} unless $self;
25 2696         84265 bless $self, $class;
26             }
27              
28              
29             sub read {
30 53     53 1 126 my $self = shift;
31 53         181 my ( $level ) = @_;
32              
33             # say STDERR Data::Dumper->Dump( [ $self ], [ 'self' ] );
34              
35             return join( ' ',
36 53         139 map { $_->read( $level + 1 ) } @{$self->{Element}} );
  135         819  
  53         213  
37             }
38              
39             1;
40              
41             __END__