ExtendedKeys.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« ExtendedKeys/Tie.pm ↑ Summary
1 package Hash::ExtendedKeys;
2  
3 3 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use Hash::ExtendedKeys::Tie;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 our $VERSION = '0.04';
9  
10 3 ▶use overload '%{}' => sub { ${$_[0]}->{hash}; }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
11  
12 sub new {
13 2 ▶ my ($class) = @_;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
14  
15 2 my $self = \{
16 hash => {},
17 };
18  
19 2 tie %{${$self}->{hash}}, 'Hash::ExtendedKeys::Tie';
20  
21 2 bless $self, $class;
22 }
23  
24 =head1 NAME
25  
26 Hash::ExtendedKeys - Hash Keys
27  
28 =head1 VERSION
29  
30 Version 0.04
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<< <email at lnation.org> >>
75  
76 =head1 BUGS
77  
78 Please report any bugs or feature requests to C<bug-hash-extendedkeys at rt.cpan.org>, or through
79 the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Hash-ExtendedKeys>. 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<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Hash-ExtendedKeys>
96  
97 =item * CPAN Ratings
98  
99 L<https://cpanratings.perl.org/d/Hash-ExtendedKeys>
100  
101 =item * Search CPAN
102  
103 L<https://metacpan.org/release/Hash-ExtendedKeys>
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 3 1; # End of Hash::ExtendedKeys
« ExtendedKeys/Tie.pm ↑ Summary