Aspect/Point/Around.pm

filter: Statementstmt 100% 28 / 28 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 97.5% 40 / 41 SCAR 11.0
CC
3
Cov
100%
proceed
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Aspect/Pointcut/Call.pm ↑ Summary Aspect/Pointcut/Wantarray.pm »
1 package Aspect::Point::Around;
2 =pod
3  
4 =head1 NAME
5  
6 Aspect::Point - The Join Point context for "around" advice code
7  
8 =head1 SYNOPSIS
9  
10 =head1 METHODS
11  
12 =cut
13  
14 21 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 21 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 21 ▶use Aspect::Point ();
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 21 our $VERSION = '0.97_06';
19 21 our @ISA = 'Aspect::Point';
20  
21 21 ▶use constant type => 'around';
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 sub original {
24 $_[0]->{original};
25 }
26  
27 sub proceed {
28 33 ▶ my $self = shift;
Subroutine proceed: called CC=3 SCAR=11.0
Pod undocumented
29  
30 return $self->return_value(
31 Sub::Uplevel::uplevel(
32 2,
33 $self->{original},
34 3 @{$self->{args}},
35 )
36 33 ▶ ) if $self->{wantarray};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"wantarray"} 3 30 33
37  
38 return $self->return_value(
39 scalar Sub::Uplevel::uplevel(
40 2,
41 $self->{original},
42 22 @{$self->{args}},
43 )
44 30 ▶ ) if defined $self->{wantarray};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"wantarray"} 22 8 30
45  
46 return Sub::Uplevel::uplevel(
47 2,
48 $self->{original},
49 8 @{$self->{args}},
50 );
51 }
52  
53 BEGIN {
54 21 ▶ *run_original = *proceed;
Subroutine BEGIN: called CC=1 SCAR=0.0
55 }
56  
57  
58  
59  
60  
61 ######################################################################
62 # Optional XS Acceleration
63  
64 BEGIN {
65 21 ▶ local $@;
Subroutine BEGIN: called CC=1 SCAR=0.0
66 21 ▶ eval <<'END_PERL';
Subroutine BEGIN: called CC=1 SCAR=0.0
67 use Class::XSAccessor 1.08 {
68 replace => 1,
69 getters => {
70 'original' => 'original',
71 },
72 };
73 END_PERL
74 }
75  
76 21 1;
77  
78 =pod
79  
80 =head1 AUTHORS
81  
82 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
83  
84 Marcel GrE<uuml>nauer E<lt>marcel@cpan.orgE<gt>
85  
86 Ran Eilam E<lt>eilara@cpan.orgE<gt>
87  
88 =head1 COPYRIGHT
89  
90 Copyright 2001 by Marcel GrE<uuml>nauer
91  
92 Some parts copyright 2009 - 2011 Adam Kennedy.
93  
94 This library is free software; you can redistribute it and/or modify
95 it under the same terms as Perl itself.
96  
97 =cut
« Aspect/Pointcut/Call.pm ↑ Summary Aspect/Pointcut/Wantarray.pm »