File Coverage

blib/lib/DTL/Fast/Expression/Operator/Binary/And.pm
Criterion Covered Total %
statement 15 16 93.7
branch 1 2 50.0
condition 3 3 100.0
subroutine 5 5 100.0
pod 0 1 0.0
total 24 27 88.8


line stmt bran cond sub pod time code
1             package DTL::Fast::Expression::Operator::Binary::And;
2 4     4   2554 use strict; use utf8; use warnings FATAL => 'all';
  4     4   6  
  4     4   103  
  4         12  
  4         4  
  4         22  
  4         74  
  4         4  
  4         151  
3 4     4   12 use parent 'DTL::Fast::Expression::Operator::Binary::Logical';
  4         5  
  4         21  
4              
5             $DTL::Fast::OPS_HANDLERS{'and'} = __PACKAGE__;
6              
7             sub dispatch
8             {
9 730     730 0 835 my( $self, $arg1, $context ) = @_;
10              
11 730 50       2263 if( UNIVERSAL::can($arg1, 'and') )
12             {
13 0         0 return $arg1->and($self->get_b($context));
14             }
15             else
16             {
17 730   100     2253 return $arg1 && $self->get_b($context);
18             }
19             }
20              
21             1;