File Coverage

blib/lib/DTL/Fast/Expression/Operator/Binary.pm
Criterion Covered Total %
statement 18 20 90.0
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 3 0.0
total 24 30 80.0


line stmt bran cond sub pod time code
1             package DTL::Fast::Expression::Operator::Binary;
2 11     11   7412 use strict; use utf8; use warnings FATAL => 'all';
  11     11   19  
  11     11   264  
  11         53  
  11         22  
  11         56  
  11         263  
  11         21  
  11         364  
3 11     11   54 use parent 'DTL::Fast::Expression::Operator::Unary';
  11         20  
  11         86  
4              
5             sub new
6             {
7 171     171 0 413 my( $proto, $argument1, $argument2, %kwargs ) = @_;
8 171         336 $kwargs{'b'} = $argument2;
9            
10 171         780 my $self = $proto->SUPER::new($argument1, %kwargs);
11            
12 171         971 return $self;
13             }
14              
15             sub render
16             {
17 934     934 0 1385 my( $self, $context ) = @_;
18            
19             return $self->dispatch(
20             $self->{'a'}->render($context, 1)
21 934         2822 , $self->{'b'}->render($context, 1)
22             , $context
23             );
24             }
25              
26             sub dispatch
27             {
28 0     0 0   my( $self, $arg1, $arg2 ) = @_;
29 0           die 'Abstract method dispatch was not overriden in subclass '.(ref $self);
30             }
31              
32             1;