Filename | /home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/x86_64-linux/Scalar/Util.pm |
Statements | Executed 13 statements in 175µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
125 | 2 | 2 | 111µs | 111µs | blessed (xsub) | Scalar::Util::
54 | 4 | 2 | 41µs | 41µs | reftype (xsub) | Scalar::Util::
1 | 1 | 1 | 10µs | 20µ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 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
2 | # This program is free software; you can redistribute it and/or | ||||
3 | # modify it under the same terms as Perl itself. | ||||
4 | # | ||||
5 | # Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk> | ||||
6 | |||||
7 | package Scalar::Util; | ||||
8 | |||||
9 | 2 | 151µs | 2 | 29µs | # spent 20µs (10+10) within Scalar::Util::BEGIN@9 which was called:
# once (10µs+10µs) by Data::DPath::Context::BEGIN@17 at line 9 # spent 20µs making 1 call to Scalar::Util::BEGIN@9
# spent 10µs making 1 call to strict::import |
10 | 1 | 400ns | require Exporter; | ||
11 | 1 | 300ns | require List::Util; # List::Util loads the XS | ||
12 | |||||
13 | 1 | 4µs | our @ISA = qw(Exporter); | ||
14 | 1 | 2µs | our @EXPORT_OK = qw( | ||
15 | blessed refaddr reftype weaken unweaken isweak | ||||
16 | |||||
17 | dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted | ||||
18 | ); | ||||
19 | 1 | 200ns | our $VERSION = "1.38"; | ||
20 | 1 | 10µs | $VERSION = eval $VERSION; # spent 1µs executing statements in string eval | ||
21 | |||||
22 | 1 | 100ns | our @EXPORT_FAIL; | ||
23 | |||||
24 | 1 | 400ns | unless (defined &weaken) { | ||
25 | push @EXPORT_FAIL, qw(weaken); | ||||
26 | } | ||||
27 | 1 | 100ns | unless (defined &isweak) { | ||
28 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
29 | } | ||||
30 | 1 | 200ns | unless (defined &isvstring) { | ||
31 | push @EXPORT_FAIL, qw(isvstring); | ||||
32 | } | ||||
33 | |||||
34 | sub export_fail { | ||||
35 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
36 | require Carp; | ||||
37 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
38 | } | ||||
39 | |||||
40 | if (grep { /^isvstring$/ } @_ ) { | ||||
41 | require Carp; | ||||
42 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
43 | } | ||||
44 | |||||
45 | @_; | ||||
46 | } | ||||
47 | |||||
48 | 1 | 6µs | 1; | ||
49 | |||||
50 | __END__ | ||||
# spent 111µs within Scalar::Util::blessed which was called 125 times, avg 890ns/call:
# 91 times (82µs+0s) by Devel::StackTrace::_ref_to_string at line 79 of Devel/StackTrace.pm, avg 905ns/call
# 34 times (29µs+0s) by Exception::Class::Base::caught at line 209 of Exception/Class/Base.pm, avg 850ns/call | |||||
# spent 41µs within Scalar::Util::reftype which was called 54 times, avg 767ns/call:
# 34 times (24µs+0s) by Data::DPath::Context::_any at line 119 of Data/DPath/Context.pm, avg 712ns/call
# 14 times (10µs+0s) by Data::DPath::Context::_select_key at line 287 of Data/DPath/Context.pm, avg 700ns/call
# 4 times (5µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 1µs/call
# 2 times (3µs+0s) by Data::DPath::Context::_select_anystep at line 312 of Data/DPath/Context.pm, avg 1µs/call |