Filename | /usr/lib/x86_64-linux-gnu/perl5/5.20/Class/XSAccessor/Heavy.pm |
Statements | Executed 15 statements in 696µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 38µs | 50µs | BEGIN@27 | Class::XSAccessor::Heavy::
1 | 1 | 1 | 22µs | 22µs | BEGIN@4 | Class::XSAccessor::Heavy::
1 | 1 | 1 | 13µs | 35µs | BEGIN@30 | Class::XSAccessor::Heavy::
1 | 1 | 1 | 12µs | 24µs | BEGIN@5 | Class::XSAccessor::Heavy::
1 | 1 | 1 | 12µs | 50µs | BEGIN@7 | Class::XSAccessor::Heavy::
1 | 1 | 1 | 11µs | 19µs | BEGIN@6 | Class::XSAccessor::Heavy::
0 | 0 | 0 | 0s | 0s | check_sub_existence | Class::XSAccessor::Heavy::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package # hide from PAUSE | ||||
2 | Class::XSAccessor::Heavy; | ||||
3 | |||||
4 | 2 | 62µs | 1 | 22µs | # spent 22µs within Class::XSAccessor::Heavy::BEGIN@4 which was called:
# once (22µs+0s) by Class::XSAccessor::BEGIN@6 at line 4 # spent 22µs making 1 call to Class::XSAccessor::Heavy::BEGIN@4 |
5 | 2 | 58µs | 2 | 36µs | # spent 24µs (12+12) within Class::XSAccessor::Heavy::BEGIN@5 which was called:
# once (12µs+12µs) by Class::XSAccessor::BEGIN@6 at line 5 # spent 24µs making 1 call to Class::XSAccessor::Heavy::BEGIN@5
# spent 12µs making 1 call to strict::import |
6 | 2 | 42µs | 2 | 26µs | # spent 19µs (11+8) within Class::XSAccessor::Heavy::BEGIN@6 which was called:
# once (11µs+8µs) by Class::XSAccessor::BEGIN@6 at line 6 # spent 19µs making 1 call to Class::XSAccessor::Heavy::BEGIN@6
# spent 8µs making 1 call to warnings::import |
7 | 2 | 228µs | 2 | 88µs | # spent 50µs (12+38) within Class::XSAccessor::Heavy::BEGIN@7 which was called:
# once (12µs+38µs) by Class::XSAccessor::BEGIN@6 at line 7 # spent 50µs making 1 call to Class::XSAccessor::Heavy::BEGIN@7
# spent 38µs making 1 call to Exporter::import |
8 | |||||
9 | 1 | 600ns | our $VERSION = '1.19'; | ||
10 | 1 | 2µs | 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 | my $subname = shift; | ||||
20 | |||||
21 | my $sub_package = $subname; | ||||
22 | $sub_package =~ s/([^:]+)$// or die; | ||||
23 | my $bare_subname = $1; | ||||
24 | |||||
25 | my $sym; | ||||
26 | { | ||||
27 | 2 | 100µs | 2 | 61µs | # spent 50µs (38+12) within Class::XSAccessor::Heavy::BEGIN@27 which was called:
# once (38µs+12µs) by Class::XSAccessor::BEGIN@6 at line 27 # spent 50µs making 1 call to Class::XSAccessor::Heavy::BEGIN@27
# spent 12µs making 1 call to strict::unimport |
28 | $sym = \%{"$sub_package"}; | ||||
29 | } | ||||
30 | 2 | 198µs | 2 | 57µs | # spent 35µs (13+22) within Class::XSAccessor::Heavy::BEGIN@30 which was called:
# once (13µs+22µs) by Class::XSAccessor::BEGIN@6 at line 30 # spent 35µs making 1 call to Class::XSAccessor::Heavy::BEGIN@30
# spent 22µs making 1 call to warnings::unimport |
31 | local *s = $sym->{$bare_subname}; | ||||
32 | my $coderef = *s{CODE}; | ||||
33 | if ($coderef) { | ||||
34 | $sub_package =~ s/::$//; | ||||
35 | 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 | 4µs | 1; | ||
40 | |||||
41 | __END__ |