The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Verifier::Results - Results of a Data::Verifier

SYNOPSIS

    use Data::Verifier;

    my $dv = Data::Verifier->new(profile => {
        name => {
            required    => 1,
            type        => 'Str',
            filters     => [ qw(collapse trim) ]
        }
        age  => {
            type        => 'Int';
        },
        sign => {
            required    => 1,
            type        => 'Str'
        }
    });

    my $results = $dv->verify({
        name => 'Cory', age => 'foobar'
    });

    $results->success; # no

    $results->is_invalid('name'); # no
    $results->is_invalid('age'); # yes

    $results->is_missing('name'); # no
    $results->is_missing('sign'); # yes

SUCCESS OR FAILURE

success

Returns true or false based on if the verification's success.

VALUES

get_value ($name)

Returns the value for the specified field. The value may be different from the one originally supplied due to filtering or coercion.

INVALID FIELDS

is_invalid ($name)

Returns true if the specific field is invalid.

invalids

Returns a list of invalid field names.

invalid_count

Returns the count of invalid fields in this result.

MISSING FIELDS

is_missing ($name)

Returns true if the specified field is missing.

missings

Returns a list of missing field names.

missing_count

Returns the count of missing fields in this result.

AUTHOR

Cory G Watson, <gphat at cpan.org>

COPYRIGHT & LICENSE

Copyright 2009 Cold Hard Code, LLC

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.