lib/Devel/Caller/Perl.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 9 | 100.0 |
branch | 3 | 4 | 75.0 |
condition | 1 | 2 | 50.0 |
subroutine | 4 | 4 | 100.0 |
pod | 1 | 2 | 50.0 |
total | 18 | 21 | 85.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package DB; | ||||||
2 | sub called_args { | ||||||
3 | 2 | 2 | 0 | 4 | my ($level) = @_; | ||
4 | 2 | 50 | 26 | my @foo = caller( ( $level || 0 ) + 3 ); | |||
5 | 2 | 100 | 12 | wantarray ? @DB::args : \@DB::args; | |||
6 | } | ||||||
7 | |||||||
8 | package Devel::Caller::Perl; | ||||||
9 | 1 | 1 | 72225 | use DB; | |||
1 | 4729 | ||||||
1 | 111 | ||||||
10 | $Devel::Caller::Perl::VERSION = '1.4'; | ||||||
11 | sub import { | ||||||
12 | 1 | 50 | 1 | 17 | *{(caller)[0].'::called_args'} = \&called_args | ||
1 | 19 | ||||||
13 | if $_[1] eq 'called_args'; | ||||||
14 | } | ||||||
15 | 2 | 2 | 1 | 23 | sub called_args { &DB::called_args } | ||
16 | |||||||
17 | 1; | ||||||
18 | |||||||
19 | __END__ |