Filename | /usr/lib/x86_64-linux-gnu/perl/5.20/Scalar/Util.pm |
Statements | Executed 13 statements in 1.22ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 18µs | 34µs | BEGIN@9 | Scalar::Util::
1 | 1 | 1 | 3µs | 3µs | weaken (xsub) | Scalar::Util::
1 | 1 | 1 | 1µs | 1µs | reftype (xsub) | Scalar::Util::
1 | 1 | 1 | 500ns | 500ns | blessed (xsub) | 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 | 274µs | 2 | 50µs | # spent 34µs (18+16) within Scalar::Util::BEGIN@9 which was called:
# once (18µs+16µs) by C4::Context::BEGIN@100 at line 9 # spent 34µs making 1 call to Scalar::Util::BEGIN@9
# spent 16µs making 1 call to strict::import |
10 | 1 | 700ns | require Exporter; | ||
11 | 1 | 913µ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 refaddr reftype weaken unweaken isweak | ||||
16 | |||||
17 | dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted | ||||
18 | ); | ||||
19 | 1 | 300ns | our $VERSION = "1.38"; | ||
20 | 1 | 19µs | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval | ||
21 | |||||
22 | 1 | 200ns | our @EXPORT_FAIL; | ||
23 | |||||
24 | 1 | 600ns | 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 | 7µs | 1; | ||
49 | |||||
50 | __END__ | ||||
# spent 500ns within Scalar::Util::blessed which was called:
# once (500ns+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm | |||||
# spent 1µs within Scalar::Util::reftype which was called:
# once (1µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm | |||||
# spent 3µs within Scalar::Util::weaken which was called:
# once (3µs+0s) by C4::Context::BEGIN@100 at line 302 of DBI.pm |