Filename | /usr/lib/x86_64-linux-gnu/perl/5.28/Scalar/Util.pm |
Statements | Executed 15 statements in 412µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1922113 | 6 | 3 | 1.94s | 1.94s | blessed (xsub) | Scalar::Util::
144 | 1 | 1 | 67µs | 67µs | openhandle (xsub) | Scalar::Util::
25 | 1 | 1 | 66µs | 66µs | refaddr (xsub) | Scalar::Util::
1 | 1 | 1 | 10µs | 12µs | BEGIN@9 | Scalar::Util::
1 | 1 | 1 | 6µs | 19µs | BEGIN@10 | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
0 | 0 | 0 | 0s | 0s | set_prototype | 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 | 24µs | 2 | 14µs | # spent 12µs (10+2) within Scalar::Util::BEGIN@9 which was called:
# once (10µs+2µs) by YAML::XS::BEGIN@21 at line 9 # spent 12µs making 1 call to Scalar::Util::BEGIN@9
# spent 2µs making 1 call to strict::import |
10 | 2 | 273µs | 2 | 32µs | # spent 19µs (6+13) within Scalar::Util::BEGIN@10 which was called:
# once (6µs+13µs) by YAML::XS::BEGIN@21 at line 10 # spent 19µs making 1 call to Scalar::Util::BEGIN@10
# spent 13µs making 1 call to warnings::import |
11 | 1 | 500ns | require Exporter; | ||
12 | |||||
13 | 1 | 5µs | our @ISA = qw(Exporter); | ||
14 | 1 | 1µs | our @EXPORT_OK = qw( | ||
15 | blessed refaddr reftype weaken unweaken isweak | ||||
16 | |||||
17 | dualvar isdual isvstring looks_like_number openhandle readonly set_prototype | ||||
18 | tainted | ||||
19 | ); | ||||
20 | 1 | 200ns | our $VERSION = "1.50"; | ||
21 | 1 | 13µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
22 | |||||
23 | 1 | 70µs | require List::Util; # List::Util loads the XS | ||
24 | 1 | 16µs | 1 | 10µs | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) # spent 10µs making 1 call to UNIVERSAL::VERSION |
25 | |||||
26 | our @EXPORT_FAIL; | ||||
27 | |||||
28 | 1 | 300ns | unless (defined &weaken) { | ||
29 | push @EXPORT_FAIL, qw(weaken); | ||||
30 | } | ||||
31 | 1 | 100ns | unless (defined &isweak) { | ||
32 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
33 | } | ||||
34 | 1 | 300ns | unless (defined &isvstring) { | ||
35 | push @EXPORT_FAIL, qw(isvstring); | ||||
36 | } | ||||
37 | |||||
38 | sub export_fail { | ||||
39 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
40 | require Carp; | ||||
41 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
42 | } | ||||
43 | |||||
44 | if (grep { /^isvstring$/ } @_ ) { | ||||
45 | require Carp; | ||||
46 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
47 | } | ||||
48 | |||||
49 | @_; | ||||
50 | } | ||||
51 | |||||
52 | # set_prototype has been moved to Sub::Util with a different interface | ||||
53 | sub set_prototype(&$) | ||||
54 | { | ||||
55 | my ( $code, $proto ) = @_; | ||||
56 | return Sub::Util::set_prototype( $proto, $code ); | ||||
57 | } | ||||
58 | |||||
59 | 1 | 8µs | 1; | ||
60 | |||||
61 | __END__ | ||||
# spent 1.94s within Scalar::Util::blessed which was called 1922113 times, avg 1µs/call:
# 767335 times (1.23s+0s) by Template::Context::template at line 87 of Template/Context.pm, avg 2µs/call
# 384174 times (214ms+0s) by Template::Context::process at line 373 of Template/Context.pm, avg 558ns/call
# 384174 times (177ms+0s) by Template::Context::process at line 331 of Template/Context.pm, avg 460ns/call
# 383161 times (306ms+0s) by Template::Context::process at line 339 of Template/Context.pm, avg 799ns/call
# 3257 times (3.11ms+0s) by Template::Iterator::new at line 55 of Template/Iterator.pm, avg 954ns/call
# 12 times (13µs+0s) by File::Copy::_eq at line 59 of File/Copy.pm, avg 1µs/call | |||||
# spent 67µs within Scalar::Util::openhandle which was called 144 times, avg 465ns/call:
# 144 times (67µs+0s) by YAML::XS::LoadFile at line 44 of YAML/XS.pm, avg 465ns/call | |||||
# spent 66µs within Scalar::Util::refaddr which was called 25 times, avg 3µs/call:
# 25 times (66µs+0s) by File::Temp::NUMIFY at line 948 of File/Temp.pm, avg 3µs/call |