line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tie::Anon; |
2
|
4
|
|
|
4
|
|
97004
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
172
|
|
3
|
4
|
|
|
4
|
|
18
|
no strict 'refs'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
99
|
|
4
|
4
|
|
|
4
|
|
24
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
116
|
|
5
|
4
|
|
|
4
|
|
19
|
use Exporter qw(import); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
599
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = "0.02"; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @EXPORT = our @EXPORT_OK = qw(tiea tieh ties); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my %sigil_for = ( |
12
|
|
|
|
|
|
|
tiea => '@', |
13
|
|
|
|
|
|
|
tieh => '%', |
14
|
|
|
|
|
|
|
ties => '$' |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
foreach my $method (keys %sigil_for) { |
18
|
|
|
|
|
|
|
my $sigil = $sigil_for{$method}; |
19
|
2
|
100
|
|
2
|
|
1943
|
*{$method} = eval(<<"DEF"); |
|
2
|
100
|
|
|
|
16
|
|
|
2
|
0
|
|
|
|
58
|
|
|
1
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
3022
|
|
|
4
|
|
|
|
|
32
|
|
|
4
|
|
|
|
|
102
|
|
|
2
|
|
|
|
|
8
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub { |
21
|
|
|
|
|
|
|
my \$class = shift; |
22
|
|
|
|
|
|
|
my \$result = tie(my ${sigil}tied, \$class, \@_); |
23
|
|
|
|
|
|
|
return undef if not defined \$result; |
24
|
|
|
|
|
|
|
return \\${sigil}tied; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
DEF |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |