Updates to MX::Declare required changes
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / Types.pm
index 62eecba..bafaa33 100644 (file)
@@ -1,19 +1,16 @@
 use MooseX::Declare;
-class SQL::Abstract::Types {
+class SQL::Abstract::Types is dirty {
   use Moose::Util::TypeConstraints;
-  use MooseX::Types -declare => [qw/NameSeparator QuoteChars AST ArrayAST HashAST/];
   use MooseX::Types::Moose qw/ArrayRef Str Int Ref HashRef/;
 
-  subtype ArrayAST, as ArrayRef,
-    where { is_Str($_->[0]) && substr($_->[0],0,1) eq '-' },
-    message { "First key of arrayref must be a string starting with '-'"; };
+  clean;
 
-  subtype HashAST, as HashRef,
+  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" };
 
-  subtype AST, as ArrayAST|HashAST; 
-
   subtype NameSeparator,
     as Str,
     where { length($_) == 1 };