Data-Checker
view release on metacpan or search on metacpan
This checks $check_opts for the existance of a key named $label
indicating that that check should be performed.
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.
check_option
$val = $obj->check_option($check_opts,$opt [,$default [,$label]]);
This returns the value of the given option ($opt) for this check
($label).
If the option is not found, $default is returned (if it is given).
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, $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.
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
($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 $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. $negate_fail is a similar message that will be given when
the check fails but the 'negate' option is set.
$err, $warn, and $info are listrefs containing the messages.
If $err is non-empty, an error has occurred.
If the $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 $label is empty, the test is always performed.
KNOWN BUGS AND LIMITATIONS
None known.
SEE ALSO
Data::Checker::DNS
Predefined DNS checks.
Data::Checker::Ping
Predefined checks to see if a host reponds to pings.
Data::Checker::IP
Predefined checks to see if an element is a valid IP.
LICENSE
This script is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
AUTHOR
Sullivan Beck (sbeck@cpan.org)
( run in 1.883 second using v1.01-cache-2.11-cpan-39bf76dae61 )