line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package UR::Role::MethodModifier::Around; |
2
|
1
|
|
|
1
|
|
87
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = "0.46"; # UR $VERSION; |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
4
|
use UR; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
8
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
UR::Object::Type->define( |
10
|
|
|
|
|
|
|
class_name => 'UR::Role::MethodModifier::Around', |
11
|
|
|
|
|
|
|
is => 'UR::Role::MethodModifier', |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
0
|
3
|
sub type { 'around' } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub create_wrapper_sub { |
17
|
1
|
|
|
1
|
0
|
3
|
my($self, $original_sub) = @_; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
5
|
my $around = $self->code; |
20
|
|
|
|
|
|
|
return sub { |
21
|
1
|
|
|
1
|
|
10
|
$around->($original_sub, @_); |
|
|
|
|
1
|
|
|
|
22
|
1
|
|
|
|
|
6
|
}; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |