File Coverage

blib/lib/Repl/Core/Pair.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition 3 9 33.3
subroutine 5 5 100.0
pod 0 3 0.0
total 25 34 73.5


line stmt bran cond sub pod time code
1             package Repl::Core::Pair;
2            
3             # Pragma's.
4 2     2   34038 use strict;
  2         6  
  2         71  
5            
6             # Uses.
7 2     2   10 use Carp;
  2         4  
  2         3006  
8            
9             sub new
10             {
11 38     38 0 3921 my $invocant = shift;
12 38         128 my %args = (@_);
13 38   33     147 my $class = ref($invocant) || $invocant;
14            
15             # Initialize the token instance.
16 38         59 my $self = {};
17 38   33     139 $self->{LEFT} = $args{LEFT} || confess "A pair needs an lvalue.";
18 38   33     126 $self->{RIGHT} = $args{RIGHT} || confess "A pair needs an rvalue.";
19            
20 38         244 return bless($self, $class);
21             }
22            
23             sub getLeft
24             {
25 37     37 0 1284 my $self = shift;
26 37         184 return $self->{LEFT};
27             }
28            
29             sub getRight
30             {
31 37     37 0 51 my $self = shift;
32 37         136 return $self->{RIGHT};
33             }
34            
35            
36             1;