File Coverage

blib/lib/DTL/Fast/Expression/Operator/Binary/Or.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::Or;
2 3     3   1769 use strict;
  3         7  
  3         103  
3 3     3   16 use utf8;
  3         5  
  3         18  
4 3     3   72 use warnings FATAL => 'all';
  3         6  
  3         102  
5 3     3   13 use parent 'DTL::Fast::Expression::Operator::Binary::Logical';
  3         7  
  3         15  
6              
7             $DTL::Fast::OPS_HANDLERS{or} = __PACKAGE__;
8              
9             sub dispatch
10             {
11 721     721 0 1528 my ( $self, $arg1, $context) = @_;
12              
13 721 50       2760 if (UNIVERSAL::can($arg1, 'or'))
14             {
15 0         0 return $arg1->or($self->get_b($context));
16             }
17             else
18             {
19 721   100     2966 return $arg1 || $self->get_b($context);
20             }
21             }
22              
23             1;