| 1 | package CHI::Test::Driver::Role::CheckKeyValidity; | ||||||||||||||||||||||||||||
| 2 | 3 | $CHI::Test::Driver::Role::CheckKeyValidity::VERSION = '0.59'; | |||||||||||||||||||||||||||
| 3 | 3 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use Moo::Role; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 3 | has 'test_object' => ( is => 'rw' ); | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | before 'get' => sub { | ||||||||||||||||||||||||||||
| 11 | 2538 | ▶ | my ( $self, $key ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | 2538 | $self->verify_valid_test_key($key); | |||||||||||||||||||||||||||
| 13 | 3 | }; | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | before 'set' => sub { | ||||||||||||||||||||||||||||
| 16 | 732 | ▶ | my ( $self, $key ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | 732 | $self->verify_valid_test_key($key); | |||||||||||||||||||||||||||
| 18 | 3 | }; | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | sub verify_valid_test_key { | ||||||||||||||||||||||||||||
| 21 | 3270 | ▶ | my ( $self, $key ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
verify_valid_test_key: called CC=3 SCAR=11.7
Pod
undocumented
| |||||||||||||||||||||||||||||
| 22 | croak "invalid test key '$key'" | ||||||||||||||||||||||||||||
| 23 | if ( defined($key) | ||||||||||||||||||||||||||||
| 24 | 3270 | ▶ | && !exists( $self->test_object->{all_test_keys_hash}->{$key} ) ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $key and not exists $self->test_object->{"all_test_keys_hash"}{$key}
MC/DC0%0/2
defined $key and not exists $self->test_object->{"all_test_keys_hash"}{$key}
defined $key
not exists $self->test_object->{"all_test_keys_hash"}{$key}
Truth table66%2/3
A and not(B)
A= defined $keyB= not exists $self->test_object->{"all_test_keys_hash"}{$key}
| |||||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 3 | 1; | |||||||||||||||||||||||||||