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   1462 use strict;
  98         213  
  98         2266  
3 98     98   432 use utf8;
  98         197  
  98         446  
4 98     98   1946 use warnings FATAL => 'all';
  98         177  
  98         4508  
5              
6             our $VERSION = '1.00';
7              
8 98     98   492 use DTL::Fast qw(register_operator);
  98         205  
  98         12089  
9              
10             register_operator(
11             or => [ 0, 'DTL::Fast::Expression::Operator::Binary::Or' ],
12              
13             and => [ 1, 'DTL::Fast::Expression::Operator::Binary::And' ],
14              
15             '==' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Eq' ],
16             '!=' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Ne' ],
17             '<>' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Ne' ],
18             '<' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Lt' ],
19             '>' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Gt' ],
20             '<=' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Le' ],
21             '>=' => [ 2, 'DTL::Fast::Expression::Operator::Binary::Ge' ],
22              
23             '+' => [ 3, 'DTL::Fast::Expression::Operator::Binary::Plus' ],
24             '-' => [ 3, 'DTL::Fast::Expression::Operator::Binary::Minus' ],
25              
26             '*' => [ 4, 'DTL::Fast::Expression::Operator::Binary::Mul' ],
27             '/' => [ 4, 'DTL::Fast::Expression::Operator::Binary::Div' ],
28             '%' => [ 4, 'DTL::Fast::Expression::Operator::Binary::Mod' ],
29             mod => [ 4, 'DTL::Fast::Expression::Operator::Binary::Mod' ],
30              
31             'not in' => [ 5, 'DTL::Fast::Expression::Operator::Binary::NotIn' ],
32             in => [ 5, 'DTL::Fast::Expression::Operator::Binary::In' ],
33              
34             not => [ 6, 'DTL::Fast::Expression::Operator::Unary::Not' ],
35              
36             defined => [ 7, 'DTL::Fast::Expression::Operator::Unary::Defined' ],
37              
38             '**' => [ 8, 'DTL::Fast::Expression::Operator::Binary::Pow' ],
39             pow => [ 8, 'DTL::Fast::Expression::Operator::Binary::Pow' ],
40             );
41              
42             1;