File Coverage

blib/lib/SpeL/Object/RelOperator.pm
Criterion Covered Total %
statement 55 56 98.2
branch 20 28 71.4
condition n/a
subroutine 14 14 100.0
pod 1 1 100.0
total 90 99 90.9


line stmt bran cond sub pod time code
1             # -*- cperl -*-
2             # ABSTRACT: LaTeX relational operator object
3              
4              
5             package SpeL::Object::RelOperator;
6              
7 41     41   857 use SpeL::Object::Environment;
  41         78  
  41         2172  
8 41     41   243 use SpeL::Object::Group;
  41         86  
  41         2291  
9 41     41   271 use SpeL::Object::MathInline;
  41         85  
  41         2034  
10 41     41   18350 use SpeL::Object::MathEnvironment;
  41         152  
  41         2448  
11 41     41   18117 use SpeL::Object::Item;
  41         144  
  41         1771  
12 41     41   228 use SpeL::Object::Command;
  41         74  
  41         1330  
13 41     41   18024 use SpeL::Object::TokenSequence;
  41         151  
  41         2623  
14 41     41   257 use SpeL::Object::Variable;
  41         80  
  41         1632  
15 41     41   191 use SpeL::Object::Realnumber;
  41         100  
  41         1660  
16              
17 41     41   214 use parent 'Exporter';
  41         84  
  41         273  
18 41     41   2311 use Carp;
  41         85  
  41         2349  
19              
20 41     41   200 use SpeL::I18n;
  41         74  
  41         1102  
21 41     41   179 use Data::Dumper;
  41         505  
  41         17374  
22              
23              
24              
25             sub read {
26 78     78 1 156 my $self = shift;
27 78         161 my ( $level ) = @_;
28              
29             # say STDERR Data::Dumper->Dump( [ $self ], [ 'self' ] );
30 78 100       561 $self->{''} eq '=' and return $SpeL::I18n::lh->maketext( '=' );
31 27 50       78 $self->{''} eq '\approx' and return $SpeL::I18n::lh->maketext( 'approx' );
32 27 100       76 $self->{''} eq '\equiv' and return $SpeL::I18n::lh->maketext( 'equivalent' );
33 26 50       84 $self->{''} =~ /\\ne/ and return $SpeL::I18n::lh->maketext( 'notequal' );
34 26 50       142 $self->{''} =~ /<|\\lt/ and return $SpeL::I18n::lh->maketext( '<' );
35 26 50       74 $self->{''} eq '\ll' and return $SpeL::I18n::lh->maketext( '<<' );
36 26 50       94 $self->{''} =~ />|\\gt/ and return $SpeL::I18n::lh->maketext( '>' );
37 26 50       71 $self->{''} eq '\gg' and return $SpeL::I18n::lh->maketext( '>>' );
38 26 50       66 $self->{''} eq '\le' and return $SpeL::I18n::lh->maketext( '<=' );
39 26 100       74 $self->{''} eq '\ge' and return $SpeL::I18n::lh->maketext( '>=' );
40 25 100       83 $self->{''} eq '\in' and return $SpeL::I18n::lh->maketext( 'In' );
41 21 100       66 $self->{''} eq '\leadsto' and return $SpeL::I18n::lh->maketext( 'Leadsto' );
42 20 100       68 $self->{''} eq '\to' and return $SpeL::I18n::lh->maketext( 'To' );
43 19 50       122 $self->{''} eq '&' and return ',, ';
44            
45 0           return 'Error: RelOperator';
46             }
47              
48             1;
49              
50             __END__