Skip to content

Instantly share code, notes, and snippets.

@genehack
Created April 25, 2012 17:53
Show Gist options
  • Save genehack/2491657 to your computer and use it in GitHub Desktop.
Save genehack/2491657 to your computer and use it in GitHub Desktop.
=head1 METHODS
=headd2 valid_values
Checks the result of the C<success> method. If it returns false, returns an
empty hashref. If it returns true, returns the result of calling the the
C<valid_values> method on each of the results in this verifier. Returns them
as a hash of hashes, keyed by result name.
=cut
sub valid_values {
my $self = shift;
return $self->success ?
{ map {( $_ => { $self->get_results($_)->valid_values })} keys %{ $self->results } }
: {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment