line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
# Copyright (c) 1997-2007 Graham Barr . All rights reserved. |
3
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
4
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# Maintained since 2013 by Paul Evans |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package Scalar::Util; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use strict; |
11
|
|
|
|
|
|
|
require Exporter; |
12
|
|
|
|
|
|
|
require List::Util; # List::Util loads the XS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
15
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
16
|
|
|
|
|
|
|
blessed refaddr reftype weaken unweaken isweak |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
our $VERSION = "1.38"; |
21
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
our @EXPORT_FAIL; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
unless (defined &weaken) { |
26
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(weaken); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
unless (defined &isweak) { |
29
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isweak isvstring); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
unless (defined &isvstring) { |
32
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isvstring); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
0
|
0
|
|
sub export_fail { |
|
0
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
if (grep { /^(?:weaken|isweak)$/ } @_ ) { |
37
|
0
|
|
|
|
|
|
require Carp; |
38
|
|
|
|
|
|
|
Carp::croak("Weak references are not implemented in the version of perl"); |
39
|
|
|
|
|
|
|
} |
40
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
if (grep { /^isvstring$/ } @_ ) { |
42
|
0
|
|
|
|
|
|
require Carp; |
43
|
|
|
|
|
|
|
Carp::croak("Vstrings are not implemented in the version of perl"); |
44
|
|
|
|
|
|
|
} |
45
|
0
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
@_; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |