Zipper/Hash.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 1 / 1 totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Zipper/API.pm ↑ Summary Zipper/MOP.pm »
1 package Data::Zipper::Hash;
2 2 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 $Data::Zipper::Hash::VERSION = '0.02';
4 }
5 # ABSTRACT: A zipper for hash references
6  
7 2 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use MooseX::Types::Moose qw( Str HashRef );
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use MooseX::Types::Structured qw( Tuple );
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 2 with 'Data::Zipper::API' => { type => Tuple[ Str, HashRef ] };
15  
16 3 ▶sub traverse {
Subroutine traverse: called CC=1 SCAR=0.0
17 3 my ($self, $path) = @_;
18 return (
19 3 $self->focus->{$path},
20 [ $path, $self->focus ],
21 );
22 }
23  
24 3 ▶sub reconstruct {
Subroutine reconstruct: called CC=1 SCAR=0.0
Pod documented
25 3 my ($self, $value, $path) = @_;
26 3 my ($key, $object) = @$path;
27 return {
28 3 %{ $object },
29 $key => $value
30 };
31 }
32  
33 2 __PACKAGE__->meta->make_immutable;
34 2 1;
35  
36  
37 __END__
« Zipper/API.pm ↑ Summary Zipper/MOP.pm »