line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package # hide from PAUSE |
2
|
|
|
|
|
|
|
Class::XSAccessor::Heavy; |
3
|
|
|
|
|
|
|
|
4
|
23
|
|
|
23
|
|
355
|
use 5.008; |
|
23
|
|
|
|
|
139
|
|
|
23
|
|
|
|
|
826
|
|
5
|
23
|
|
|
23
|
|
111
|
use strict; |
|
23
|
|
|
|
|
37
|
|
|
23
|
|
|
|
|
635
|
|
6
|
23
|
|
|
23
|
|
127
|
use warnings; |
|
23
|
|
|
|
|
57
|
|
|
23
|
|
|
|
|
1162
|
|
7
|
23
|
|
|
23
|
|
107
|
use Carp; |
|
23
|
|
|
|
|
33
|
|
|
23
|
|
|
|
|
4428
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.19'; |
10
|
|
|
|
|
|
|
our @CARP_NOT = qw( |
11
|
|
|
|
|
|
|
Class::XSAccessor |
12
|
|
|
|
|
|
|
Class::XSAccessor::Array |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# TODO Move more duplicated code from XSA and XSA::Array here |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub check_sub_existence { |
19
|
130
|
|
|
130
|
0
|
192
|
my $subname = shift; |
20
|
|
|
|
|
|
|
|
21
|
130
|
|
|
|
|
174
|
my $sub_package = $subname; |
22
|
130
|
50
|
|
|
|
944
|
$sub_package =~ s/([^:]+)$// or die; |
23
|
130
|
|
|
|
|
306
|
my $bare_subname = $1; |
24
|
|
|
|
|
|
|
|
25
|
130
|
|
|
|
|
144
|
my $sym; |
26
|
|
|
|
|
|
|
{ |
27
|
23
|
|
|
23
|
|
158
|
no strict 'refs'; |
|
23
|
|
|
|
|
41
|
|
|
23
|
|
|
|
|
1190
|
|
|
130
|
|
|
|
|
165
|
|
28
|
130
|
|
|
|
|
145
|
$sym = \%{"$sub_package"}; |
|
130
|
|
|
|
|
342
|
|
29
|
|
|
|
|
|
|
} |
30
|
23
|
|
|
23
|
|
126
|
no warnings; |
|
23
|
|
|
|
|
37
|
|
|
23
|
|
|
|
|
3450
|
|
31
|
130
|
|
|
|
|
277
|
local *s = $sym->{$bare_subname}; |
32
|
130
|
|
|
|
|
216
|
my $coderef = *s{CODE}; |
33
|
130
|
100
|
|
|
|
521
|
if ($coderef) { |
34
|
2
|
|
|
|
|
10
|
$sub_package =~ s/::$//; |
35
|
2
|
|
|
|
|
495
|
Carp::croak("Cannot replace existing subroutine '$bare_subname' in package '$sub_package' with an XS implementation. If you wish to force a replacement, add the 'replace => 1' parameter to the arguments of 'use ".(caller())[0]."'."); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |