Filename | /usr/lib/perl/5.18/Scalar/Util.pm |
Statements | Executed 13 statements in 388µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
116 | 3 | 2 | 128µs | 128µs | weaken (xsub) | Scalar::Util::
33 | 1 | 1 | 32µs | 32µs | reftype (xsub) | Scalar::Util::
17 | 3 | 3 | 14µs | 14µs | blessed (xsub) | Scalar::Util::
1 | 1 | 1 | 14µs | 29µs | BEGIN@9 | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Scalar::Util.pm | ||||
2 | # | ||||
3 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
4 | # This program is free software; you can redistribute it and/or | ||||
5 | # modify it under the same terms as Perl itself. | ||||
6 | |||||
7 | package Scalar::Util; | ||||
8 | |||||
9 | 2 | 268µs | 2 | 44µs | # spent 29µs (14+15) within Scalar::Util::BEGIN@9 which was called:
# once (14µs+15µs) by main::BEGIN@124 at line 9 # spent 29µs making 1 call to Scalar::Util::BEGIN@9
# spent 15µs making 1 call to strict::import |
10 | 1 | 500ns | require Exporter; | ||
11 | 1 | 84µs | require List::Util; # List::Util loads the XS | ||
12 | |||||
13 | 1 | 6µs | our @ISA = qw(Exporter); | ||
14 | 1 | 2µs | our @EXPORT_OK = qw( | ||
15 | blessed | ||||
16 | dualvar | ||||
17 | isdual | ||||
18 | isvstring | ||||
19 | isweak | ||||
20 | looks_like_number | ||||
21 | openhandle | ||||
22 | readonly | ||||
23 | refaddr | ||||
24 | reftype | ||||
25 | set_prototype | ||||
26 | tainted | ||||
27 | weaken | ||||
28 | ); | ||||
29 | 1 | 300ns | our $VERSION = "1.27"; | ||
30 | 1 | 18µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
31 | |||||
32 | 1 | 200ns | our @EXPORT_FAIL; | ||
33 | |||||
34 | 1 | 500ns | unless (defined &weaken) { | ||
35 | push @EXPORT_FAIL, qw(weaken); | ||||
36 | } | ||||
37 | 1 | 200ns | unless (defined &isweak) { | ||
38 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
39 | } | ||||
40 | 1 | 200ns | unless (defined &isvstring) { | ||
41 | push @EXPORT_FAIL, qw(isvstring); | ||||
42 | } | ||||
43 | |||||
44 | sub export_fail { | ||||
45 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
46 | require Carp; | ||||
47 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
48 | } | ||||
49 | |||||
50 | if (grep { /^isvstring$/ } @_ ) { | ||||
51 | require Carp; | ||||
52 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
53 | } | ||||
54 | |||||
55 | @_; | ||||
56 | } | ||||
57 | |||||
58 | 1 | 7µs | 1; | ||
59 | |||||
60 | __END__ | ||||
# spent 14µs within Scalar::Util::blessed which was called 17 times, avg 853ns/call:
# 9 times (8µs+0s) by Search::Elasticsearch::Util::load_plugin at line 50 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Util.pm, avg 878ns/call
# 6 times (4µs+0s) by Method::Generate::Accessor::_generate_call_code at line 437 of Method/Generate/Accessor.pm, avg 633ns/call
# 2 times (3µs+0s) by File::Copy::_eq at line 94 of File/Copy.pm, avg 1µs/call | |||||
# spent 32µs within Scalar::Util::reftype which was called 33 times, avg 964ns/call:
# 33 times (32µs+0s) by Sub::Install::_CODELIKE at line 84 of /opt/flows/lib/lib/perl5/Sub/Install.pm, avg 964ns/call | |||||
# spent 128µs within Scalar::Util::weaken which was called 116 times, avg 1µs/call:
# 54 times (63µs+0s) by Sub::Defer::defer_sub at line 56 of Sub/Defer.pm, avg 1µs/call
# 44 times (38µs+0s) by Sub::Quote::quote_sub at line 84 of Sub/Quote.pm, avg 873ns/call
# 18 times (26µs+0s) by Sub::Defer::undefer_sub at line 32 of Sub/Defer.pm, avg 1µs/call |