Filename | /usr/lib/perl5/Readonly/XS.pm |
Statements | Executed 28 statements in 692µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 22µs | 28µs | BEGIN@18 | Readonly::XS::
1 | 1 | 1 | 18µs | 41µs | BEGIN@32 | Readonly::XS::
1 | 1 | 1 | 16µs | 42µs | BEGIN@19 | Readonly::XS::
1 | 1 | 1 | 13µs | 13µs | import | Readonly::XS::
1 | 1 | 1 | 11µs | 25µs | BEGIN@46 | Readonly::XS::
1 | 1 | 1 | 9µs | 52µs | BEGIN@45 | Readonly::XS::
1 | 1 | 1 | 9µs | 68µs | BEGIN@20 | Readonly::XS::
1 | 1 | 1 | 6µs | 6µs | BEGIN@31 | Readonly::XS::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | =for gpg | ||||
2 | |||||
- - | |||||
16 | package Readonly::XS; | ||||
17 | |||||
18 | 3 | 88µs | 2 | 33µs | # spent 28µs (22+5) within Readonly::XS::BEGIN@18 which was called:
# once (22µs+5µs) by Readonly::BEGIN@2 at line 18 # spent 28µs making 1 call to Readonly::XS::BEGIN@18
# spent 5µs making 1 call to strict::import |
19 | 3 | 36µs | 2 | 68µs | # spent 42µs (16+26) within Readonly::XS::BEGIN@19 which was called:
# once (16µs+26µs) by Readonly::BEGIN@2 at line 19 # spent 42µs making 1 call to Readonly::XS::BEGIN@19
# spent 26µs making 1 call to warnings::import |
20 | 3 | 68µs | 2 | 128µs | # spent 68µs (9+59) within Readonly::XS::BEGIN@20 which was called:
# once (9µs+59µs) by Readonly::BEGIN@2 at line 20 # spent 68µs making 1 call to Readonly::XS::BEGIN@20
# spent 59µs making 1 call to vars::import |
21 | |||||
22 | 1 | 700ns | $VERSION = '1.04'; | ||
23 | |||||
24 | 1 | 900ns | require XSLoader; | ||
25 | 1 | 277µs | 1 | 269µs | XSLoader::load('Readonly::XS', $VERSION); # spent 269µs making 1 call to XSLoader::load |
26 | |||||
27 | |||||
28 | # It is an error to use this from any module but Readonly. | ||||
29 | # But sooner or later, someone will. | ||||
30 | BEGIN | ||||
31 | # spent 6µs within Readonly::XS::BEGIN@31 which was called:
# once (6µs+0s) by Readonly::BEGIN@2 at line 38 | ||||
32 | 3 | 56µs | 2 | 64µs | # spent 41µs (18+23) within Readonly::XS::BEGIN@32 which was called:
# once (18µs+23µs) by Readonly::BEGIN@2 at line 32 # spent 41µs making 1 call to Readonly::XS::BEGIN@32
# spent 23µs making 1 call to warnings::unimport |
33 | 1 | 6µs | if ($MAGIC_COOKIE ne "Do NOT use or require Readonly::XS unless you're me.") | ||
34 | { | ||||
35 | require Carp; | ||||
36 | Carp::croak("Readonly::XS is not a standalone module. You should not use it directly."); | ||||
37 | } | ||||
38 | 1 | 33µs | 1 | 6µs | } # spent 6µs making 1 call to Readonly::XS::BEGIN@31 |
39 | |||||
40 | sub import | ||||
41 | # spent 13µs within Readonly::XS::import which was called:
# once (13µs+0s) by Readonly::BEGIN@2 at line 2 of (eval 1020)[Readonly.pm:49] | ||||
42 | 3 | 7µs | my $func; | ||
43 | for $func (qw/is_sv_readonly make_sv_readonly/) | ||||
44 | { | ||||
45 | 3 | 38µs | 2 | 94µs | # spent 52µs (9+43) within Readonly::XS::BEGIN@45 which was called:
# once (9µs+43µs) by Readonly::BEGIN@2 at line 45 # spent 52µs making 1 call to Readonly::XS::BEGIN@45
# spent 43µs making 1 call to strict::unimport |
46 | 3 | 67µs | 2 | 38µs | # spent 25µs (11+14) within Readonly::XS::BEGIN@46 which was called:
# once (11µs+14µs) by Readonly::BEGIN@2 at line 46 # spent 25µs making 1 call to Readonly::XS::BEGIN@46
# spent 14µs making 1 call to warnings::unimport |
47 | 2 | 10µs | *{"Readonly::$func"} = \&$func; | ||
48 | } | ||||
49 | $Readonly::XSokay = 1; | ||||
50 | } | ||||
51 | |||||
52 | |||||
53 | 1 | 5µs | 1; | ||
54 | __END__ |