File Coverage

blib/lib/Dallycot/AST/Equality.pm
Criterion Covered Total %
statement 12 20 60.0
branch n/a
condition n/a
subroutine 4 7 57.1
pod 0 3 0.0
total 16 30 53.3


line stmt bran cond sub pod time code
1             package Dallycot::AST::Equality;
2             our $AUTHORITY = 'cpan:JSMITH';
3              
4             # ABSTRACT: Tests that all expressions evaluate to the same value
5              
6 23     23   13254 use strict;
  23         39  
  23         742  
7 23     23   97 use warnings;
  23         37  
  23         506  
8              
9 23     23   81 use utf8;
  23         35  
  23         106  
10 23     23   404 use parent 'Dallycot::AST::ComparisonBase';
  23         34  
  23         108  
11              
12             sub to_string {
13 0     0 0   my ($self) = @_;
14              
15 0           return join( " = ", map { $_->to_string } @{$self} );
  0            
  0            
16             }
17              
18             sub to_rdf {
19 0     0 0   my($self, $model) = @_;
20              
21 0           return $model -> apply(
22             $model -> meta_uri('loc:all-equal'),
23             [ @$self ]
24             );
25             }
26              
27             sub compare {
28 0     0 0   my ( $self, $engine, $left_value, $right_value ) = @_;
29              
30 0           return $left_value->is_equal( $engine, $right_value );
31             }
32              
33             1;