line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pcore::Util::Scalar; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
|
|
68
|
use Pcore -export => { |
4
|
|
|
|
|
|
|
SCALAR => [qw[blessed refaddr reftype weaken isweak looks_like_number tainted refcount is_glob]], |
5
|
|
|
|
|
|
|
REF => [qw[is_ref is_scalarref is_arrayref is_hashref is_coderef is_regexpref is_globref is_formatref is_ioref is_refref is_plain_ref is_plain_scalarref is_plain_arrayref is_plain_hashref is_plain_coderef is_plain_globref is_plain_formatref is_plain_refref is_blessed_ref is_blessed_scalarref is_blessed_arrayref is_blessed_hashref is_blessed_coderef is_blessed_globref is_blessed_formatref is_blessed_refref ]], |
6
|
5
|
|
|
5
|
|
32
|
}; |
|
5
|
|
|
|
|
11
|
|
7
|
5
|
|
|
5
|
|
35
|
use Scalar::Util qw[blessed dualvar isdual readonly refaddr reftype tainted weaken isweak isvstring looks_like_number set_prototype]; ## no critic qw[Modules::ProhibitEvilModules] |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
477
|
|
8
|
5
|
|
|
5
|
|
1327
|
use Devel::Refcount qw[refcount]; |
|
5
|
|
|
|
|
3251
|
|
|
5
|
|
|
|
|
245
|
|
9
|
5
|
|
|
5
|
|
1347
|
use Ref::Util qw[:all]; |
|
5
|
|
|
|
|
2315
|
|
|
5
|
|
|
|
|
2033
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub is_glob : prototype($) { |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# return is_blessed_ref $_[0] && ( $_[0]->isa('GLOB') || $_[0]->isa('IO') ); |
14
|
|
|
|
|
|
|
|
15
|
10
|
50
|
|
10
|
0
|
45
|
if ( !is_ref $_[0] ) { |
16
|
10
|
|
|
|
|
47
|
return is_globref \$_[0]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
else { |
19
|
0
|
|
0
|
|
|
|
return is_blessed_globref $_[0] || is_globref $_[0] || is_ioref $_[0]; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
0
|
0
|
|
sub on_destroy ( $scalar, $cb ) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
state $init = !!require Variable::Magic; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
Variable::Magic::cast( $_[0], Variable::Magic::wizard( free => $cb ) ); |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
=pod |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=encoding utf8 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Pcore::Util::Scalar |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 DESCRIPTION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=cut |