Filename | /usr/lib/perl5/Readonly/XS.pm |
Statements | Executed 28 statements in 644µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 33µs | 41µs | BEGIN@18 | Readonly::XS::
1 | 1 | 1 | 23µs | 23µs | import | Readonly::XS::
1 | 1 | 1 | 16µs | 41µs | BEGIN@19 | Readonly::XS::
1 | 1 | 1 | 13µs | 35µs | BEGIN@32 | Readonly::XS::
1 | 1 | 1 | 10µs | 32µs | BEGIN@45 | Readonly::XS::
1 | 1 | 1 | 9µs | 60µs | BEGIN@20 | Readonly::XS::
1 | 1 | 1 | 9µs | 22µs | BEGIN@46 | 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 | 64µs | 2 | 49µs | # spent 41µs (33+8) within Readonly::XS::BEGIN@18 which was called:
# once (33µs+8µs) by Readonly::BEGIN@2 at line 18 # spent 41µs making 1 call to Readonly::XS::BEGIN@18
# spent 8µs making 1 call to strict::import |
19 | 3 | 37µs | 2 | 66µs | # spent 41µs (16+25) within Readonly::XS::BEGIN@19 which was called:
# once (16µs+25µs) by Readonly::BEGIN@2 at line 19 # spent 41µs making 1 call to Readonly::XS::BEGIN@19
# spent 25µs making 1 call to warnings::import |
20 | 3 | 57µs | 2 | 110µs | # spent 60µs (9+50) within Readonly::XS::BEGIN@20 which was called:
# once (9µs+50µs) by Readonly::BEGIN@2 at line 20 # spent 60µs making 1 call to Readonly::XS::BEGIN@20
# spent 50µs making 1 call to vars::import |
21 | |||||
22 | 1 | 500ns | $VERSION = '1.04'; | ||
23 | |||||
24 | 1 | 900ns | require XSLoader; | ||
25 | 1 | 259µs | 1 | 250µs | XSLoader::load('Readonly::XS', $VERSION); # spent 250µ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 | 51µs | 2 | 57µs | # spent 35µs (13+22) within Readonly::XS::BEGIN@32 which was called:
# once (13µs+22µs) by Readonly::BEGIN@2 at line 32 # spent 35µs making 1 call to Readonly::XS::BEGIN@32
# spent 22µ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 | 43µs | 1 | 6µs | } # spent 6µs making 1 call to Readonly::XS::BEGIN@31 |
39 | |||||
40 | sub import | ||||
41 | # spent 23µs within Readonly::XS::import which was called:
# once (23µs+0s) by Readonly::BEGIN@2 at line 2 of (eval 1038)[Readonly.pm:49] | ||||
42 | 5 | 30µs | my $func; | ||
43 | for $func (qw/is_sv_readonly make_sv_readonly/) | ||||
44 | { | ||||
45 | 3 | 29µs | 2 | 53µs | # spent 32µs (10+22) within Readonly::XS::BEGIN@45 which was called:
# once (10µs+22µs) by Readonly::BEGIN@2 at line 45 # spent 32µs making 1 call to Readonly::XS::BEGIN@45
# spent 22µs making 1 call to strict::unimport |
46 | 3 | 62µs | 2 | 35µs | # spent 22µs (9+13) within Readonly::XS::BEGIN@46 which was called:
# once (9µs+13µs) by Readonly::BEGIN@2 at line 46 # spent 22µs making 1 call to Readonly::XS::BEGIN@46
# spent 13µs making 1 call to warnings::unimport |
47 | *{"Readonly::$func"} = \&$func; | ||||
48 | } | ||||
49 | $Readonly::XSokay = 1; | ||||
50 | } | ||||
51 | |||||
52 | |||||
53 | 1 | 5µs | 1; | ||
54 | __END__ |