Remove HashAST and ArrayAST types
[dbsrgits/SQL-Abstract-2.0-ish.git] / lib / SQL / Abstract / Types.pm
index 62eecba..9c49bc9 100644 (file)
@@ -1,19 +1,13 @@
 use MooseX::Declare;
 class SQL::Abstract::Types {
   use Moose::Util::TypeConstraints;
-  use MooseX::Types -declare => [qw/NameSeparator QuoteChars AST ArrayAST HashAST/];
+  use MooseX::Types -declare => [qw/NameSeparator QuoteChars AST/];
   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 '-'"; };
-
-  subtype HashAST, as HashRef,
+  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 };