line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package UNIVERSAL::source_location_for; |
2
|
2
|
|
|
2
|
|
54756
|
use 5.008_001; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
79
|
|
3
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
63
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
110
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.11'; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
11
|
use B (); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
41
|
|
9
|
2
|
|
|
2
|
|
9
|
use Carp qw(carp); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
422
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub UNIVERSAL::source_location_for { |
12
|
3
|
|
|
3
|
0
|
4066
|
my($self, $method) = @_; |
13
|
3
|
|
|
|
|
35
|
my $entity = $self->can($method); |
14
|
|
|
|
|
|
|
|
15
|
3
|
100
|
|
|
|
12
|
unless ($entity) { |
16
|
1
|
50
|
|
|
|
328
|
carp ("Undefined subroutine " . (ref $self ? ref $self : $self) . "::" . $method); |
17
|
1
|
|
|
|
|
8
|
return(); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
|
|
29
|
my $gv = B::svref_2object($entity)->GV; |
21
|
2
|
|
|
|
|
31
|
return($gv->FILE, $gv->LINE); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
__END__ |