| 1 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Test::Deep::HashKeys 1.205; | ||||||||||
| 5 | |||||||||||
| 6 | 8 | ▶ | use Test::Deep::Ref; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | sub init | ||||||||||
| 9 | 43 | ▶ | { | ||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 10 | 43 | my $self = shift; | |||||||||
| 11 | |||||||||||
| 12 | 43 | my %keys; | |||||||||
| 13 | 43 | @keys{@_} = (); | |||||||||
| 14 | 43 | $self->{val} = \%keys; | |||||||||
| 15 | 43 | $self->{keys} = [sort @_]; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | sub descend | ||||||||||
| 19 | 43 | ▶ | { | ||||||||
|
Subroutine
descend: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 20 | 43 | my $self = shift; | |||||||||
| 21 | 43 | my $got = shift; | |||||||||
| 22 | |||||||||||
| 23 | 43 | my $exp = $self->{val}; | |||||||||
| 24 | |||||||||||
| 25 | 43 | ▶ | return 0 unless $self->test_reftype($got, "HASH"); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | |||||||||||
| 27 | 21 | return Test::Deep::descend($got, $self->hashkeysonly($exp)); | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | sub hashkeysonly | ||||||||||
| 31 | 19 | ▶ | { | ||||||||
|
Subroutine
hashkeysonly: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 32 | 19 | require Test::Deep::HashKeysOnly; | |||||||||
| 33 | |||||||||||
| 34 | 19 | my $self = shift; | |||||||||
| 35 | 19 | my $exp = shift; | |||||||||
| 36 | |||||||||||
| 37 | 19 | return Test::Deep::HashKeysOnly->new(keys %$exp) | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | package Test::Deep::SuperHashKeys 1.205; | ||||||||||
| 41 | |||||||||||
| 42 | 8 | ▶ | use base 'Test::Deep::HashKeys'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 43 | |||||||||||
| 44 | sub hashkeysonly | ||||||||||
| 45 | 1 | ▶ | { | ||||||||
|
Subroutine
hashkeysonly: called CC=1 SCAR=0.0
| |||||||||||
| 46 | 1 | require Test::Deep::HashKeysOnly; | |||||||||
| 47 | |||||||||||
| 48 | 1 | my $self = shift; | |||||||||
| 49 | 1 | my $exp = shift; | |||||||||
| 50 | |||||||||||
| 51 | 1 | return Test::Deep::SuperHashKeysOnly->new(keys %$exp) | |||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | package Test::Deep::SubHashKeys 1.205; | ||||||||||
| 55 | |||||||||||
| 56 | 8 | ▶ | use base 'Test::Deep::HashKeys'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 57 | |||||||||||
| 58 | sub hashkeysonly | ||||||||||
| 59 | 1 | ▶ | { | ||||||||
|
Subroutine
hashkeysonly: called CC=1 SCAR=0.0
| |||||||||||
| 60 | 1 | require Test::Deep::HashKeysOnly; | |||||||||
| 61 | |||||||||||
| 62 | 1 | my $self = shift; | |||||||||
| 63 | 1 | my $exp = shift; | |||||||||
| 64 | |||||||||||
| 65 | 1 | return Test::Deep::SubHashKeysOnly->new(keys %$exp) | |||||||||
| 66 | } | ||||||||||
| 67 | |||||||||||
| 68 | 8 | 1; | |||||||||
| 69 | |||||||||||
| 70 | __END__ | ||||||||||