line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7842
|
use 5.008; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
44
|
|
2
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
60
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Attribute::TieClasses; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
1
|
|
|
1
|
|
54
|
$Attribute::TieClasses::VERSION = '1.101700'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Attribute wrappers for CPAN Tie classes |
11
|
1
|
|
|
1
|
|
1156
|
use Attribute::Handlers; |
|
1
|
|
|
|
|
6176
|
|
|
1
|
|
|
|
|
5
|
|
12
|
1
|
|
|
1
|
|
34
|
no warnings 'redefine'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
740
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Define for each attribute which class to use for which type of |
15
|
|
|
|
|
|
|
# attribute. I.e., one attribute can cause the referent to be tied |
16
|
|
|
|
|
|
|
# to different classes depending on whether the referent is a scalar, |
17
|
|
|
|
|
|
|
# an array etc. |
18
|
|
|
|
|
|
|
# Each hash value can be a string or a reference to an array of strings. |
19
|
|
|
|
|
|
|
our %tieclass = ( |
20
|
|
|
|
|
|
|
__TEST => [ |
21
|
|
|
|
|
|
|
qw/ SCALAR=Tie::Scalar::Test ARRAY=Tie::Array::Test |
22
|
|
|
|
|
|
|
HASH=Tie::Hash::Test / |
23
|
|
|
|
|
|
|
], # used for test.pl; ignore |
24
|
|
|
|
|
|
|
Alias => 'HASH=Tie::AliasHash', |
25
|
|
|
|
|
|
|
Cache => 'HASH=Tie::Cache', |
26
|
|
|
|
|
|
|
CharArray => 'ARRAY=Tie::CharArray', |
27
|
|
|
|
|
|
|
Counter => 'SCALAR=Tie::Counter', |
28
|
|
|
|
|
|
|
Cycle => 'SCALAR=Tie::Cycle', |
29
|
|
|
|
|
|
|
DBI => 'HASH=Tie::DBI', |
30
|
|
|
|
|
|
|
Decay => 'SCALAR=Tie::Scalar::Decay', |
31
|
|
|
|
|
|
|
Defaults => 'HASH=Tie::HashDefaults', |
32
|
|
|
|
|
|
|
Dict => 'HASH=Tie::TieDict', |
33
|
|
|
|
|
|
|
Dir => 'HASH=Tie::Dir', |
34
|
|
|
|
|
|
|
DirHandle => 'HASH=Tie::DirHandle', |
35
|
|
|
|
|
|
|
Discovery => 'HASH=Tie::Discovery', |
36
|
|
|
|
|
|
|
Dx => 'HASH=Tie::DxHash', |
37
|
|
|
|
|
|
|
Encrypted => 'HASH=Tie::EncryptedHash', |
38
|
|
|
|
|
|
|
FileLRU => 'HASH=Tie::FileLRUCache', |
39
|
|
|
|
|
|
|
FlipFlop => 'SCALAR=Tie::FlipFlop', |
40
|
|
|
|
|
|
|
IPAddrKeyed => 'HASH=Tie::NetAddr::IP', |
41
|
|
|
|
|
|
|
Insensitive => 'HASH=Tie::CPHash', |
42
|
|
|
|
|
|
|
Ix => 'HASH=Tie::IxHash', |
43
|
|
|
|
|
|
|
LDAP => 'HASH=Tie::LDAP', |
44
|
|
|
|
|
|
|
LRU => 'HASH=Tie::Cache::LRU', |
45
|
|
|
|
|
|
|
ListKeyed => 'HASH=Tie::ListKeyedHash', |
46
|
|
|
|
|
|
|
Math => 'HASH=Tie::Math', |
47
|
|
|
|
|
|
|
Mmap => 'ARRAY=Tie::MmapArray', |
48
|
|
|
|
|
|
|
NumRange => 'SCALAR=Tie::NumRange', |
49
|
|
|
|
|
|
|
NumRangeWrap => 'SCALAR=Tie::NumRangeWrap=Tie::NumRange', |
50
|
|
|
|
|
|
|
Offset => 'ARRAY=Tie::OffsetArray', |
51
|
|
|
|
|
|
|
Ordered => 'HASH=Tie::LLHash', |
52
|
|
|
|
|
|
|
PackedInt => 'ARRAY=Tie::IntegerArray', |
53
|
|
|
|
|
|
|
PerFH => 'SCALAR=Tie::PerFH', |
54
|
|
|
|
|
|
|
Persistent => 'HASH=Tie::Persistent', |
55
|
|
|
|
|
|
|
RDBM => 'HASH=Tie::RDBM', |
56
|
|
|
|
|
|
|
Range => 'HASH=Tie::RangeHash', |
57
|
|
|
|
|
|
|
Rank => 'HASH=Tie::Hash::Rank', |
58
|
|
|
|
|
|
|
Ref => 'HASH=Tie::RefHash', |
59
|
|
|
|
|
|
|
Regexp => 'HASH=Tie::RegexpHash', |
60
|
|
|
|
|
|
|
Secure => 'HASH=Tie::SecureHash', |
61
|
|
|
|
|
|
|
Sentient => 'HASH=Tie::SentientHash', |
62
|
|
|
|
|
|
|
Shadow => 'HASH=Tie::ShadowHash', |
63
|
|
|
|
|
|
|
Sort => 'HASH=Tie::SortHash', |
64
|
|
|
|
|
|
|
Strict => 'HASH=Tie::StrictHash', |
65
|
|
|
|
|
|
|
Substr => 'HASH=Tie::SubstrHash', |
66
|
|
|
|
|
|
|
TextDir => 'HASH=Tie::TextDir', |
67
|
|
|
|
|
|
|
Timeout => 'SCALAR=Tie::Scalar::Timeout', |
68
|
|
|
|
|
|
|
Toggle => 'SCALAR=Tie::Toggle', |
69
|
|
|
|
|
|
|
Transact => 'HASH=Tie::TransactHash', |
70
|
|
|
|
|
|
|
TwoLevel => 'HASH=Tie::TwoLevelHash', |
71
|
|
|
|
|
|
|
Vec => 'ARRAY=Tie::VecArray', |
72
|
|
|
|
|
|
|
WarnGlobal => 'SCALAR=Tie::WarnGlobal::Scalar', |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# Define synonyms for each attribute. Each synonym creates another handler, |
76
|
|
|
|
|
|
|
# so use them sparingly. |
77
|
|
|
|
|
|
|
# Each hash value can be a string or a reference to an array of strings. |
78
|
|
|
|
|
|
|
our %synonyms = ( |
79
|
|
|
|
|
|
|
Alias => 'Aliased', |
80
|
|
|
|
|
|
|
Range => 'RangeKeyed', |
81
|
|
|
|
|
|
|
Rank => 'Ranked', |
82
|
|
|
|
|
|
|
Regexp => 'RegexpKeyed', |
83
|
|
|
|
|
|
|
Shadow => 'Shadowed', |
84
|
|
|
|
|
|
|
Sort => 'Sorted', |
85
|
|
|
|
|
|
|
Substr => 'Fixed', |
86
|
|
|
|
|
|
|
Vec => 'Vector', |
87
|
|
|
|
|
|
|
); |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
# create a handler sub for each attribute definition and each synonym of same |
90
|
|
|
|
|
|
|
for my $attr (keys %tieclass) { |
91
|
|
|
|
|
|
|
my $attrdef = $tieclass{$attr}; |
92
|
|
|
|
|
|
|
$attrdef = [$attrdef] unless ref $attrdef eq 'ARRAY'; |
93
|
|
|
|
|
|
|
for my $def (@$attrdef) { |
94
|
|
|
|
|
|
|
my ($reftype, $tieclass, $filename) = split /=/, $def; |
95
|
|
|
|
|
|
|
$filename ||= $tieclass; |
96
|
|
|
|
|
|
|
my $syns = defined $synonyms{$attr} ? $synonyms{$attr} : []; |
97
|
|
|
|
|
|
|
$syns = [$syns] unless ref $syns eq 'ARRAY'; |
98
|
|
|
|
|
|
|
make_handler($_, $reftype, $tieclass, $filename) for $attr, @$syns; |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
# generate and eval the handler code |
103
|
|
|
|
|
|
|
sub make_handler { |
104
|
60
|
|
|
60
|
1
|
108
|
my ($attr, $reftype, $tieclass, $filename) = @_; |
105
|
60
|
|
33
|
|
|
111
|
$filename ||= $tieclass; # might be several classes in one file |
106
|
60
|
|
|
|
|
139
|
my $code = qq! |
107
|
|
|
|
|
|
|
sub UNIVERSAL::$attr : ATTR($reftype) { |
108
|
|
|
|
|
|
|
my (\$ref, \$data) = \@_[2,4]; |
109
|
|
|
|
|
|
|
\$data = [ \$data ] unless ref \$data eq 'ARRAY'; |
110
|
|
|
|
|
|
|
eval "use $filename; 1"; |
111
|
|
|
|
|
|
|
!; |
112
|
60
|
100
|
|
|
|
157
|
if ($reftype eq 'SCALAR') { $code .= make_tie_scalar($tieclass) } |
|
11
|
100
|
|
|
|
30
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
113
|
7
|
|
|
|
|
16
|
elsif ($reftype eq 'ARRAY') { $code .= make_tie_array($tieclass) } |
114
|
42
|
|
|
|
|
74
|
elsif ($reftype eq 'HASH') { $code .= make_tie_hash($tieclass) } |
115
|
0
|
|
|
|
|
0
|
elsif ($reftype eq 'VAR') { $code .= make_tie_var($tieclass) } |
116
|
0
|
|
|
|
|
0
|
else { die "unknown attribute type $reftype" } |
117
|
60
|
|
|
|
|
72
|
$code .= "\n} 1\n"; |
118
|
1
|
0
|
|
1
|
0
|
5
|
eval $code or die "Internal error: $@"; |
|
1
|
0
|
|
1
|
0
|
1
|
|
|
1
|
0
|
|
1
|
0
|
5
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
1
|
0
|
|
1
|
0
|
5
|
|
|
1
|
0
|
|
1
|
0
|
2
|
|
|
1
|
0
|
|
1
|
0
|
5
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
1
|
0
|
|
1
|
0
|
11
|
|
|
1
|
0
|
|
1
|
0
|
2
|
|
|
1
|
50
|
|
1
|
0
|
4
|
|
|
0
|
50
|
|
1
|
0
|
0
|
|
|
0
|
50
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
0
|
0
|
|
1
|
0
|
0
|
|
|
1
|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
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
583
|
|
|
1
|
|
|
|
|
129
|
|
|
1
|
|
|
|
|
18
|
|
|
1
|
|
|
|
|
396
|
|
|
1
|
|
|
|
|
100
|
|
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
341
|
|
|
1
|
|
|
|
|
88
|
|
|
1
|
|
|
|
|
13
|
|
|
60
|
|
|
|
|
8317
|
|
119
|
|
|
|
|
|
|
} |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# subs to generate the variant parts of the attr handler code |
122
|
11
|
|
|
11
|
1
|
34
|
sub make_tie_scalar { "tie \$\$ref, '$_[0]', \@\$data\n" } |
123
|
7
|
|
|
7
|
1
|
19
|
sub make_tie_array { "tie \@\$ref, '$_[0]', \@\$data\n" } |
124
|
42
|
|
|
42
|
1
|
95
|
sub make_tie_hash { "tie \%\$ref, '$_[0]', \@\$data\n" } |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub make_tie_var { |
127
|
0
|
|
|
0
|
1
|
|
my $tieclass = shift; |
128
|
0
|
|
|
|
|
|
return qq{ |
129
|
|
|
|
|
|
|
my \$type = ref \$ref; |
130
|
|
|
|
|
|
|
(\$type eq 'SCALAR')? tie \$\$ref,'$tieclass',\@\$data |
131
|
|
|
|
|
|
|
:(\$type eq 'ARRAY') ? tie \@\$ref,'$tieclass',\@\$data |
132
|
|
|
|
|
|
|
:(\$type eq 'HASH') ? tie \%\$ref,'$tieclass',\@\$data |
133
|
|
|
|
|
|
|
: die "Internal error: can't autotie \$type" |
134
|
|
|
|
|
|
|
} |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
1; |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
__END__ |