| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# Copyright (c) 1997-2007 Graham Barr . 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 |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package Scalar::Util; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use strict; |
|
10
|
|
|
|
|
|
|
require Exporter; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
|
13
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
|
14
|
|
|
|
|
|
|
blessed refaddr reftype weaken unweaken isweak |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
dualvar isdual isvstring looks_like_number openhandle readonly set_prototype |
|
17
|
|
|
|
|
|
|
tainted |
|
18
|
|
|
|
|
|
|
); |
|
19
|
|
|
|
|
|
|
our $VERSION = "1.42_002"; |
|
20
|
|
|
|
|
|
|
our $XS_VERSION = $VERSION; |
|
21
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
require XSLoader; |
|
24
|
|
|
|
|
|
|
XSLoader::load('Scalar::Util', $XS_VERSION); |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our @EXPORT_FAIL; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
require Sub::Util; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
unless (defined &weaken) { |
|
31
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(weaken); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
unless (defined &isweak) { |
|
34
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isweak isvstring); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
unless (defined &isvstring) { |
|
37
|
|
|
|
|
|
|
push @EXPORT_FAIL, qw(isvstring); |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub export_fail { |
|
41
|
0
|
0
|
|
0
|
0
|
|
if (grep { /^(?:weaken|isweak)$/ } @_ ) { |
|
|
0
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
require Carp; |
|
43
|
0
|
|
|
|
|
|
Carp::croak("Weak references are not implemented in the version of perl"); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
0
|
|
|
|
|
if (grep { /^isvstring$/ } @_ ) { |
|
|
0
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
require Carp; |
|
48
|
0
|
|
|
|
|
|
Carp::croak("Vstrings are not implemented in the version of perl"); |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
@_; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
# set_prototype has been moved to Sub::Util with a different interface |
|
55
|
|
|
|
|
|
|
sub set_prototype(&$) |
|
56
|
|
|
|
|
|
|
{ |
|
57
|
0
|
|
|
0
|
1
|
|
my ( $code, $proto ) = @_; |
|
58
|
0
|
|
|
|
|
|
return Sub::Util::set_prototype( $proto, $code ); |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |