Filename | C:/tmp64ng/perl/lib/Scalar/Util.pm |
Statements | Executed 13 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 0s | 0s | BEGIN@9 | Scalar::Util::
19 | 1 | 1 | 0s | 0s | blessed (xsub) | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
279 | 1 | 1 | 0s | 0s | looks_like_number (xsub) | Scalar::Util::
104 | 3 | 2 | 0s | 0s | refaddr (xsub) | Scalar::Util::
0 | 0 | 0 | 0s | 0s | set_prototype | Scalar::Util::
1 | 1 | 1 | 0s | 0s | weaken (xsub) | 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 | 0s | 2 | 0s | # spent 0s within Scalar::Util::BEGIN@9 which was called:
# once (0s+0s) by Win32::API::BEGIN@36 at line 9 # spent 0s making 1 call to Scalar::Util::BEGIN@9
# spent 0s making 1 call to strict::import |
10 | 1 | 0s | require Exporter; | ||
11 | 1 | 0s | require List::Util; # List::Util loads the XS | ||
12 | |||||
13 | 1 | 0s | our @ISA = qw(Exporter); | ||
14 | 1 | 0s | 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 | 0s | our $VERSION = "1.41"; | ||
21 | 1 | 0s | $VERSION = eval $VERSION; # spent 0s executing statements in string eval | ||
22 | |||||
23 | 1 | 0s | our @EXPORT_FAIL; | ||
24 | |||||
25 | 1 | 0s | unless (defined &weaken) { | ||
26 | push @EXPORT_FAIL, qw(weaken); | ||||
27 | } | ||||
28 | 1 | 0s | unless (defined &isweak) { | ||
29 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
30 | } | ||||
31 | 1 | 0s | unless (defined &isvstring) { | ||
32 | push @EXPORT_FAIL, qw(isvstring); | ||||
33 | } | ||||
34 | |||||
35 | sub export_fail { | ||||
36 | if (grep { /^(?:weaken|isweak)$/ } @_ ) { | ||||
37 | require Carp; | ||||
38 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
39 | } | ||||
40 | |||||
41 | if (grep { /^isvstring$/ } @_ ) { | ||||
42 | require Carp; | ||||
43 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
44 | } | ||||
45 | |||||
46 | @_; | ||||
47 | } | ||||
48 | |||||
49 | # set_prototype has been moved to Sub::Util with a different interface | ||||
50 | sub set_prototype(&$) | ||||
51 | { | ||||
52 | my ( $code, $proto ) = @_; | ||||
53 | return Sub::Util::set_prototype( $proto, $code ); | ||||
54 | } | ||||
55 | |||||
56 | 1 | 0s | 1; | ||
57 | |||||
58 | __END__ | ||||
# spent 0s within Scalar::Util::blessed which was called 19 times, avg 0s/call:
# 19 times (0s+0s) by JSON::PP::object_to_json at line 319 of JSON/PP.pm, avg 0s/call | |||||
# spent 0s within Scalar::Util::looks_like_number which was called 279 times, avg 0s/call:
# 279 times (0s+0s) by CPAN::Meta::YAML::_dump_scalar at line 666 of CPAN/Meta/YAML.pm, avg 0s/call | |||||
# spent 0s within Scalar::Util::refaddr which was called 104 times, avg 0s/call:
# 48 times (0s+0s) by CPAN::Meta::YAML::_dump_hash at line 733 of CPAN/Meta/YAML.pm, avg 0s/call
# 38 times (0s+0s) by JSON::PP::object_to_json at line 325 of JSON/PP.pm, avg 0s/call
# 18 times (0s+0s) by CPAN::Meta::YAML::_dump_array at line 694 of CPAN/Meta/YAML.pm, avg 0s/call | |||||
# spent 0s within Scalar::Util::weaken which was called:
# once (0s+0s) by Win32::API::new at line 221 of Win32/API.pm |