Test::CallFlow::ArgCheck::Regexp - Test::CallFlow::ArgCheck::Regexp documentation


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

Index


Code Index:

Test::CallFlow::ArgCheck::Regexp

Top

  die "Unfit" unless defined
    my $fit =
      Test::CallFlow::ArgCheck::Regexp->new( qr/^..$/ )->check( 0, [ 'foo' ] );

Checks arguments against a regular expression. See base class Test::CallFlow::ArgCheck.

FUNCTIONS

Top

check

  $checker->check( 1, [ 'foo', 'bar' ] ) ? 'ok' : die;

Checks the argument at given position in referred array against a regular expression.


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

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

sub check {
    my ( $self, $at, $args ) = @_;
    defined $args->[$at]
        and $args->[$at] =~ $self->{test};
}

1;