DBIx::Class::Helper::Schema::Verifier - Verify the Results and ResultSets of your Schemata
package MyApp::Schema; __PACKAGE__->load_components('Helper::Schema::Verifier'); sub result_verifiers { ( sub { my ($self, $result, $set) = @_; for ($result, $set) { die "$_ does not start with the letter A" unless m/^A/ } }, shift->next::method, ) }
DBIx::Class::Helper::Schema::Verifier is a miniscule framework to assist in creating schemata that are to your very own exacting specifications. It is inspired by my own travails in discovering that use mro 'c3' is both required and barely documented in much Perl code. As time goes by I expect to add many more verifiers, but with this inaugural release I am merely including DBIx::Class::Helper::Schema::Verifier::C3.
DBIx::Class::Helper::Schema::Verifier
use mro 'c3'
You must implement result_verifiers in your subclass of ::Verifier. Each verifier gets called on the schema and gets each result and resultset together as arguments. You can use this to validate almost anything about the results and resultsets of a schema; contributions are warmly welcomed.
result_verifiers
::Verifier
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
This software is copyright (c) 2015 by Arthur Axel "fREW" Schmidt.
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 DBIx::Class::Helpers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::Helpers
CPAN shell
perl -MCPAN -e shell install DBIx::Class::Helpers
For more information on module installation, please visit the detailed CPAN module installation guide.