RestrictedKeys.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
« RestrictedKeys/Tie.pm ↑ Summary
1 package Hash::RestrictedKeys;
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::RestrictedKeys::Tie;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 3 our $VERSION = '0.03';
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, @keys) = @_;
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::RestrictedKeys::Tie', @keys;
20  
21 2 bless $self, $class;
22 }
23  
24 3 1;
25  
26 __END__
« RestrictedKeys/Tie.pm ↑ Summary