From: Ash Berlin Date: Thu, 26 Mar 2009 20:42:52 +0000 (+0000) Subject: Clean the type library X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00a0470ec43ab74e0ef679410e24f9d1a8abc58e;p=dbsrgits%2FSQL-Abstract-2.0-ish.git Clean the type library --- diff --git a/lib/SQL/Abstract/Types.pm b/lib/SQL/Abstract/Types.pm index 9c49bc9..51b834b 100644 --- a/lib/SQL/Abstract/Types.pm +++ b/lib/SQL/Abstract/Types.pm @@ -1,9 +1,12 @@ use MooseX::Declare; class SQL::Abstract::Types { use Moose::Util::TypeConstraints; - use MooseX::Types -declare => [qw/NameSeparator QuoteChars AST/]; use MooseX::Types::Moose qw/ArrayRef Str Int Ref HashRef/; + clean; + + use MooseX::Types -declare => [qw/NameSeparator QuoteChars AST/]; + subtype AST, as HashRef, where { exists $_->{-type} && is_Str($_->{-type}) }, message { "No '-type' key, or it is not a string" };