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   1987 use strict;
  4         10  
  4         100  
3 4     4   17 use utf8;
  4         10  
  4         19  
4 4     4   86 use warnings FATAL => 'all';
  4         8  
  4         109  
5 4     4   17 use parent 'DTL::Fast::Expression::Operator::Binary::Logical';
  4         16  
  4         19  
6              
7             $DTL::Fast::OPS_HANDLERS{and} = __PACKAGE__;
8              
9             sub dispatch
10             {
11 730     730 0 1452 my ( $self, $arg1, $context ) = @_;
12              
13 730 50       2749 if (UNIVERSAL::can($arg1, 'and'))
14             {
15 0         0 return $arg1->and($self->get_b($context));
16             }
17             else
18             {
19 730   100     2867 return $arg1 && $self->get_b($context);
20             }
21             }
22              
23             1;