Use 'isa' checks for attribute validation
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Tue, 31 Jul 2012 22:52:14 +0000 (23:52 +0100)
committerArthur Axel 'fREW' Schmidt <frioux@gmail.com>
Sat, 22 Sep 2012 16:50:24 +0000 (11:50 -0500)
commit45287c815973a11dea92e12cbefeca656fffa912
treef253eca383a4e0ef3129c8b947a8498b152db3fe
parent2cb3ea5562c93d010f7000605e0764719d29ddd3
Use 'isa' checks for attribute validation

To maintain compatibility with the existing set-error-and-return-undef
API, we must jump through some hoops:

  1) Throw an object that won't be mangled by Moo's isa error prefixing
  2) Wrap things that might throw that to set ->error and return undef
  3) Store errors in the class when there is no object (i.e. ->new)
Makefile.PL
lib/SQL/Translator/Schema/Index.pm
lib/SQL/Translator/Schema/Role/Error.pm
lib/SQL/Translator/Types.pm [new file with mode: 0644]
lib/SQL/Translator/Utils.pm