| 1 | package Test2::Compare::Undef; | ||||||||||
| 2 | 176 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 176 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 176 | ▶ | use Carp qw/confess/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 176 | ▶ | use base 'Test2::Compare::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 176 | our $VERSION = '1.302226'; | |||||||||
| 10 | |||||||||||
| 11 | 176 | ▶ | use Test2::Util::HashBase; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | # Overloads '!' for us. | ||||||||||
| 14 | 176 | ▶ | use Test2::Compare::Negatable; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 4 | ▶ | sub name { '<UNDEF>' } | ||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 17 | |||||||||||
| 18 | 6 | ▶ | sub operator { | ||||||||
|
Subroutine
operator: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 19 | 6 | my $self = shift; | |||||||||
| 20 | |||||||||||
| 21 | 6 | ▶ | return 'IS NOT' if $self->{+NEGATE}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 4 | return 'IS'; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 214 | ▶ | sub verify { | ||||||||
|
Subroutine
verify: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 26 | 214 | my $self = shift; | |||||||||
| 27 | 214 | my %params = @_; | |||||||||
| 28 | 214 | my ($got, $exists) = @params{qw/got exists/}; | |||||||||
| 29 | |||||||||||
| 30 | 214 | ▶ | return 0 unless $exists; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | |||||||||||
| 32 | 212 | ▶ | return !defined($got) unless $self->{+NEGATE}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | 5 | return defined($got); | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 176 | 1; | |||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||