File Coverage

blib/lib/Aspect/Library/Wormhole.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 9 9 100.0
pod 0 1 0.0
total 33 34 97.0


line stmt bran cond sub pod time code
1             package Aspect::Library::Wormhole;
2              
3 2     2   1483 use strict;
  2         3  
  2         62  
4 2     2   11 use warnings;
  2         3  
  2         61  
5 2     2   467 use Aspect::Modular ();
  2         3  
  2         31  
6 2     2   10 use Aspect::Advice::Before ();
  2         2  
  2         24  
7 2     2   23 use Aspect::Pointcut::And ();
  2         4  
  2         23  
8 2     2   7 use Aspect::Pointcut::Call ();
  2         3  
  2         28  
9 2     2   6 use Aspect::Pointcut::Cflow ();
  2         2  
  2         285  
10              
11             our $VERSION = '0.97_06';
12             our @ISA = 'Aspect::Modular';
13              
14             sub get_advice {
15 2     2 0 2 my $self = shift;
16             Aspect::Advice::Before->new(
17             lexical => $self->lexical,
18             pointcut => Aspect::Pointcut::And->new(
19             Aspect::Pointcut::Call->new( $_[1] ),
20             Aspect::Pointcut::Cflow->new( source => $_[0] ),
21             ),
22             code => sub {
23 2     2   15 $_->args( $_->args, $_->source->self );
24             },
25 2         21 );
26             }
27              
28             1;
29              
30             __END__