Message::Stack::Parser::DataVerifier - Add messages to a Message::Stack from a Data::Verifier results
version 0.06
use Message::Stack::Parser::DataVerifier; my $dv = Data::Verifier->new; my $dv_results = $dv->verify; my $scope = 'login'; # Pass a Data::Verifier::Results object to parse. my $ms = Message::Stack->new; Message::Stack::Parser::DataVerifier::parse( $ms, $scope, $dv_results ); # and now $ms has messages based on $dv_results
This class will add a message to the provided Message::Stack for every missing or invalid field in a Data::Verifier::Result.
The fields are mapped from Data::Verifier into a Message in the following way:
"missing_$fieldname"
$fieldname
"invalid_$fieldname"
Adds messages from the provided $results to the provided $stack under the $scope that is passed in.
$results
$stack
$scope
Cory G Watson <gphat@cpan.org>
This software is copyright (c) 2012 by Cold Hard Code, LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Message::Stack::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Message::Stack::Parser
CPAN shell
perl -MCPAN -e shell install Message::Stack::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.