File Coverage

blib/lib/DTL/Fast/Expression/Operator.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1             package DTL::Fast::Expression::Operator;
2 98     98   3467 use strict; use utf8; use warnings FATAL => 'all';
  98     98   215  
  98     98   2544  
  98         501  
  98         168  
  98         472  
  98         2358  
  98         178  
  98         5587  
3              
4             our $VERSION = '1.00';
5              
6 98     98   495 use DTL::Fast qw(register_operator);
  98         179  
  98         17786  
7              
8             register_operator(
9             'or' => [0, 'DTL::Fast::Expression::Operator::Binary::Or'],
10              
11             'and' => [1, 'DTL::Fast::Expression::Operator::Binary::And'],
12              
13             '==' => [2, 'DTL::Fast::Expression::Operator::Binary::Eq'],
14             '!=' => [2, 'DTL::Fast::Expression::Operator::Binary::Ne'],
15             '<>' => [2, 'DTL::Fast::Expression::Operator::Binary::Ne'],
16             '<' => [2, 'DTL::Fast::Expression::Operator::Binary::Lt'],
17             '>' => [2, 'DTL::Fast::Expression::Operator::Binary::Gt'],
18             '<=' => [2, 'DTL::Fast::Expression::Operator::Binary::Le'],
19             '>=' => [2, 'DTL::Fast::Expression::Operator::Binary::Ge'],
20              
21             '+' => [3, 'DTL::Fast::Expression::Operator::Binary::Plus'],
22             '-' => [3, 'DTL::Fast::Expression::Operator::Binary::Minus'],
23              
24             '*' => [4, 'DTL::Fast::Expression::Operator::Binary::Mul'],
25             '/' => [4, 'DTL::Fast::Expression::Operator::Binary::Div'],
26             '%' => [4, 'DTL::Fast::Expression::Operator::Binary::Mod'],
27             'mod' => [4, 'DTL::Fast::Expression::Operator::Binary::Mod'],
28              
29             'not in' => [5, 'DTL::Fast::Expression::Operator::Binary::NotIn'],
30             'in' => [5, 'DTL::Fast::Expression::Operator::Binary::In'],
31              
32             'not' => [6, 'DTL::Fast::Expression::Operator::Unary::Not'],
33              
34             'defined' => [7, 'DTL::Fast::Expression::Operator::Unary::Defined'],
35              
36             '**' => [8, 'DTL::Fast::Expression::Operator::Binary::Pow'],
37             'pow' => [8, 'DTL::Fast::Expression::Operator::Binary::Pow'],
38             );
39              
40             1;