Data-Checker
view release on metacpan or search on metacpan
lib/Data/Checker.pod view on Meta::CPAN
=item check_level
$level = $obj->check_level($check_opts [,$label]);
Check to see what level ('err', 'info', or 'warn') the check is. If a check
is 'err' level, then if it fails, it produces an error. If it is 'warn'
level, it produces a warning, but the check is marked as a passing. If it is
'info', then if the check fails, it produces an informational message, but the
check is marked as passing.
=item check_option
$val = $obj->check_option($check_opts,$opt [,$default [,$label]]);
This returns the value of the given option (C<$opt>) for this check (C<$label>).
If the option is not found, C<$default> is returned (if it is given).
=item check_message
$obj->check_message($check_opts,$label,$element,$default_message,
$level,$err,$warn,$info);
This produces a message indicating that the check failed and stores it
in the appropriate listref.
If the 'message' option is available, that message is used. Otherwise,
C<$default_message> will be used.
The message can be a string or a listref (a multi-line message). The
string __ELEMENT__ will be replaced by the element being tested.
=item check_value
$obj->check_value($check_opts,$label,$element,$value,
$std_fail,$negate_fail,
$err,$warn,$info);
This will test to see if a check passed or failed. It takes a value (C<$value>)
and if it evaluates to true, then by default the check passes (unless the
'negate' option is present in which case it fails).
The C<$std_fail> is a message (either a string or a listref of strings) that
will be given when the check fails and the 'negate' option is not set.
C<$negate_fail> is a similar message that will be given when the check fails
but the 'negate' option is set.
C<$err>, C<$warn>, and C<$info> are listrefs containing the messages.
If C<$err> is non-empty, an error has occurred.
If the C<$negate_fail> empty is empty, the 'negate' option will be
ignored. This is typically used to test an element to see if it is
the right type of data for this check. If it isn't, other types of
checks are typically not able to run.
If C<$label> is empty, the test is always performed.
=back
=head1 KNOWN BUGS AND LIMITATIONS
None known.
=head1 SEE ALSO
=over 4
=item L<Data::Checker::DNS>
Predefined DNS checks.
=item L<Data::Checker::Ping>
Predefined checks to see if a host reponds to pings.
=item L<Data::Checker::IP>
Predefined checks to see if an element is a valid IP.
=back
=head1 LICENSE
This script is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 AUTHOR
Sullivan Beck (sbeck@cpan.org)
=cut
( run in 0.947 second using v1.01-cache-2.11-cpan-39bf76dae61 )