Filename | /usr/local/lib/perl5/site_perl/mach/5.32/Scalar/Util.pm |
Statements | Executed 0 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
69147 | 1 | 1 | 34.0ms | 34.0ms | blessed (xsub) | Scalar::Util::
0 | 0 | 0 | 0s | 0s | BEGIN@10 | Scalar::Util::
0 | 0 | 0 | 0s | 0s | BEGIN@9 | Scalar::Util::
0 | 0 | 0 | 0s | 0s | export_fail | Scalar::Util::
0 | 0 | 0 | 0s | 0s | looks_like_number (xsub) | Scalar::Util::
0 | 0 | 0 | 0s | 0s | refaddr (xsub) | Scalar::Util::
0 | 0 | 0 | 0s | 0s | reftype (xsub) | 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 | use strict; | ||||
10 | use warnings; | ||||
11 | require Exporter; | ||||
12 | |||||
13 | our @ISA = qw(Exporter); | ||||
14 | 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 | our $VERSION = "1.56"; | ||||
21 | $VERSION =~ tr/_//d; | ||||
22 | |||||
23 | require List::Util; # List::Util loads the XS | ||||
24 | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) | ||||
25 | |||||
26 | our @EXPORT_FAIL; | ||||
27 | |||||
28 | unless (defined &weaken) { | ||||
29 | push @EXPORT_FAIL, qw(weaken); | ||||
30 | } | ||||
31 | unless (defined &isweak) { | ||||
32 | push @EXPORT_FAIL, qw(isweak isvstring); | ||||
33 | } | ||||
34 | 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; | ||||
60 | |||||
61 | __END__ | ||||
# spent 34.0ms within Scalar::Util::blessed which was called 69147 times, avg 492ns/call:
# 69147 times (34.0ms+0s) by Sympa::Log::syslog at line 112 of /usr/local/libexec/sympa/Sympa/Log.pm, avg 492ns/call |