line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
# Scalar::Util.pm |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Copyright (c) 1997-2007 Graham Barr . All rights reserved. |
5
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
6
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
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 |
17
|
|
|
|
|
|
|
dualvar |
18
|
|
|
|
|
|
|
isdual |
19
|
|
|
|
|
|
|
isvstring |
20
|
|
|
|
|
|
|
isweak |
21
|
|
|
|
|
|
|
looks_like_number |
22
|
|
|
|
|
|
|
openhandle |
23
|
|
|
|
|
|
|
readonly |
24
|
|
|
|
|
|
|
refaddr |
25
|
|
|
|
|
|
|
reftype |
26
|
|
|
|
|
|
|
set_prototype |
27
|
|
|
|
|
|
|
tainted |
28
|
|
|
|
|
|
|
weaken |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
our $VERSION = "1.27"; |
31
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
our @EXPORT_FAIL; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
unless (defined &weaken) { |
36
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(weaken); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
unless (defined &isweak) { |
39
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isweak isvstring); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
unless (defined &isvstring) { |
42
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isvstring); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
0
|
0
|
|
sub export_fail { |
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
if (grep { /^(?:weaken|isweak)$/ } @_ ) { |
47
|
0
|
|
|
|
|
|
require Carp; |
48
|
|
|
|
|
|
|
Carp::croak("Weak references are not implemented in the version of perl"); |
49
|
|
|
|
|
|
|
} |
50
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
if (grep { /^isvstring$/ } @_ ) { |
52
|
0
|
|
|
|
|
|
require Carp; |
53
|
|
|
|
|
|
|
Carp::croak("Vstrings are not implemented in the version of perl"); |
54
|
|
|
|
|
|
|
} |
55
|
0
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
@_; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
__END__ |