line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
# Scalar::Util.pm |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. 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(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype); |
16
|
|
|
|
|
|
|
our $VERSION = "1.25"; |
17
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
our @EXPORT_FAIL; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
unless (defined &weaken) { |
22
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(weaken); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
unless (defined &isweak) { |
25
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isweak isvstring); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
unless (defined &isvstring) { |
28
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isvstring); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
0
|
0
|
|
0
|
0
|
|
sub export_fail { |
|
0
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
if (grep { /^(?:weaken|isweak)$/ } @_ ) { |
33
|
0
|
|
|
|
|
|
require Carp; |
34
|
|
|
|
|
|
|
Carp::croak("Weak references are not implemented in the version of perl"); |
35
|
|
|
|
|
|
|
} |
36
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
if (grep { /^isvstring$/ } @_ ) { |
38
|
0
|
|
|
|
|
|
require Carp; |
39
|
|
|
|
|
|
|
Carp::croak("Vstrings are not implemented in the version of perl"); |
40
|
|
|
|
|
|
|
} |
41
|
0
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
@_; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
#line 261 |