Test::CallFlow::ArgCheck::Equals - Test::CallFlow::ArgCheck::Equals documentation


Test-CallFlow documentation Contained in the Test-CallFlow distribution.

Index


Code Index:

Test::CallFlow::ArgCheck::Equals

Top

SYNOPSIS

Top

Checks for argument equality.

If test is undefined, arguments must be as well.

FUNCTIONS

Top

check

  die "Inequal" unless defined
    my $equality =
      Test::CallFlow::ArgCheck::Equals
        ->new( test => 'man' )
          ->check( 1, [ 'child', 'woman' ] );


Test-CallFlow documentation Contained in the Test-CallFlow distribution.

package Test::CallFlow::ArgCheck::Equals;
use strict;
use base 'Test::CallFlow::ArgCheck';

sub check {
    my ( $self, $at, $args ) = @_;
    defined $args->[$at]
        ? $self->{test} eq $args->[$at]
        : !defined $self->{test};
}

1;