line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Hash::ExtendedKeys; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
170000
|
use 5.006; |
|
3
|
|
|
|
|
28
|
|
4
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
64
|
|
5
|
3
|
|
|
3
|
|
18
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
87
|
|
6
|
3
|
|
|
3
|
|
1037
|
use Hash::ExtendedKeys::Tie; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
189
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
3031
|
use overload '%{}' => sub { ${$_[0]}->{hash}; }, fallback => 1; |
|
3
|
|
|
22
|
|
2855
|
|
|
3
|
|
|
|
|
28
|
|
|
22
|
|
|
|
|
499
|
|
|
22
|
|
|
|
|
130
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
2
|
|
|
2
|
1
|
145
|
my ($class) = @_; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
8
|
my $self = \{ |
16
|
|
|
|
|
|
|
hash => {}, |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
5
|
tie %{${$self}->{hash}}, 'Hash::ExtendedKeys::Tie'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
18
|
|
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
7
|
bless $self, $class; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Hash::ExtendedKeys - Hash Keys |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 VERSION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Version 0.03 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=cut |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Quick summary of what the module does. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Perhaps a little code snippet. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use Hash::ExtendedKeys; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $hash = Hash::ExtendedKeys->new(); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
my $ref = { a => 1, b => 2, c => 3 }; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
$hash->{$ref} = 1; |
47
|
|
|
|
|
|
|
$hash->{{ a => 1, b => 2, c => 3}}++; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
... |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
use Hash::ExtendedKeys::Tie; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
tie my %hash, 'Hash::ExtendedKeys::Tie'; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
my $ref = [qw/a b c/]; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$hash{$ref} = 1; |
58
|
|
|
|
|
|
|
$hash{[qw/a b c/]}++; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 METHODS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 new |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Instantiate a new Hash::ExtendedKeys object. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Hash::ExtendedKeys->new(); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=cut |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHOR |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
LNATION, C<< >> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 BUGS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
79
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
80
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
perldoc Hash::ExtendedKeys |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
You can also look for information at: |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=over 4 |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker (report bugs here) |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
L |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=item * CPAN Ratings |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * Search CPAN |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=back |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This software is Copyright (c) 2021 by LNATION. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This is free software, licensed under: |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
1; # End of Hash::ExtendedKeys |