File Coverage

lib/Aspect/Pointcut/BinOp.pm
Criterion Covered Total %
statement 19 20 95.0
branch n/a
condition n/a
subroutine 7 8 87.5
pod 0 4 0.0
total 26 32 81.2


line stmt bran cond sub pod time code
1             package Aspect::Pointcut::BinOp;
2              
3 1     1   5 use strict;
  1         1  
  1         28  
4 1     1   3 use warnings;
  1         1  
  1         22  
5 1     1   3 use Carp;
  1         1  
  1         42  
6              
7 1     1   3 use base 'Aspect::Pointcut';
  1         1  
  1         184  
8              
9             sub init {
10 2     2 0 4 my $self = shift;
11 2         231 $self->{left_op} = shift;
12 2         8 $self->{right_op} = shift;
13             }
14              
15             sub match_define {
16 4868     4868 0 4932 my ($self, $sub_name) = @_;
17 4868         8742 return $self->binop(
18             $self->{left_op}->match_define($sub_name),
19             $self->{right_op}->match_define($sub_name)
20             );
21             }
22              
23             sub match_run {
24 3     3 0 7 my ($self, $sub_name, $runtime_context) = @_;
25             return $self->binop(
26 3         17 $self->{left_op }->match_run($sub_name, $runtime_context),
27             $self->{right_op}->match_run($sub_name, $runtime_context)
28             );
29             }
30              
31             # template method to be defined in subclasses
32 0     0 0   sub binop { die "Must be implemented by subclass" }
33              
34             1;