GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DBIX::CLASS::HELPER::SCHEMA::VERIFIER (3)

.ds Aq ’

NAME

DBIx::Class::Helper::Schema::Verifier - Verify the Results and ResultSets of your Schemata

CONTENTS

SYNOPSIS



 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,
   )
 }



DESCRIPTION

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.

INTERFACE METHODS

    result_verifiers

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.

MORE ERRORS

Initially I kept this module simple, but after using it in production at ZipRecruiter <https://www.ziprecruiter.com> I found that showing the user the first error that occured and then giving up was pretty annoying. Now Schema::Verifier wraps both load_namespaces in DBIx::Class::Schema and load_classes in DBIx::Class::Schema and shows all the exceptions encoutered as a list at the end of loading all the results.

AUTHOR

Arthur Axel fREW Schmidt <frioux+cpan@gmail.com>

COPYRIGHT AND LICENSE

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DBIX::CLASS::HELPER::SCHEMA::VERIFIER (3) 2015-11-07

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.