line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Hash::RestrictedKeys; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
174494
|
use 5.006; |
|
3
|
|
|
|
|
26
|
|
4
|
3
|
|
|
3
|
|
17
|
use strict; |
|
3
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
70
|
|
5
|
3
|
|
|
3
|
|
37
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
76
|
|
6
|
3
|
|
|
3
|
|
1031
|
use Hash::RestrictedKeys::Tie; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
168
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
3063
|
use overload '%{}' => sub { ${$_[0]}->{hash}; }, fallback => 1; |
|
3
|
|
|
15
|
|
2606
|
|
|
3
|
|
|
|
|
23
|
|
|
15
|
|
|
|
|
1691
|
|
|
15
|
|
|
|
|
81
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
2
|
|
|
2
|
1
|
152
|
my ($class, @keys) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
7
|
my $self = \{ |
16
|
|
|
|
|
|
|
hash => {}, |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
3
|
tie %{${$self}->{hash}}, 'Hash::RestrictedKeys::Tie', @keys; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
8
|
bless $self, $class; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |