/tmp/r2OybNnoM1 | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 3 | 5 | 60.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 1 | 2 | 50.0 |
pod | n/a | ||
total | 4 | 7 | 57.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MyTest; | ||||||
2 | 2 | 2 | 3477774 | use Mite::Shim; | |||
2 | 4 | ||||||
2 | 36 | ||||||
3 | our @LOG; | ||||||
4 | sub xyz { | ||||||
5 | 0 | 0 | push @LOG, 'METHOD'; | ||||
6 | 0 | return $_[1]; | |||||
7 | } | ||||||
8 | around xyz => sub { | ||||||
9 | my ( $orig, $self, @args ) = @_; | ||||||
10 | push @LOG, 'AROUND1'; | ||||||
11 | my $r = $self->$orig( @args ); | ||||||
12 | push @LOG, 'AROUND2'; | ||||||
13 | return uc $r; | ||||||
14 | }; | ||||||
15 | before xyz => sub { | ||||||
16 | push @LOG, 'BEFORE'; | ||||||
17 | }; | ||||||
18 | after xyz => sub { | ||||||
19 | push @LOG, 'AFTER'; | ||||||
20 | }; | ||||||
21 | 1; |