Release 1.51
[scpubgit/Q-Branch.git] / lib / SQL / Abstract.pm
index 6437528..93e0393 100644 (file)
@@ -15,7 +15,7 @@ use Scalar::Util qw/blessed/;
 # GLOBALS
 #======================================================================
 
-our $VERSION  = '1.50';
+our $VERSION  = '1.51';
 
 # This would confuse some packagers
 #$VERSION      = eval $VERSION; # numify for warning-free dev releases
@@ -442,11 +442,17 @@ sub _where_HASHREF {
 
 
 sub _where_op_in_hash {
-  my ($self, $op, $v) = @_; 
+  my ($self, $op_str, $v) = @_; 
+
+  $op_str =~ /^ (AND|OR|NEST) ( \_? \d* ) $/xi
+    or puke "unknown operator: -$op_str";
+
+  my $op = uc($1); # uppercase, remove trailing digits
+  if ($2) {
+    belch 'Use of [and|or|nest]_N modifiers is deprecated and will be removed in SQLA v2.0. '
+          . "You probably wanted ...-and => [ $op_str => COND1, $op_str => COND2 ... ]";
+  }
 
-  $op =~ /^(AND|OR|NEST)[_\d]*/i
-    or puke "unknown operator: -$op";
-  $op = uc($1); # uppercase, remove trailing digits
   $self->_debug("OP(-$op) within hashref, recursing...");
 
   $self->_SWITCH_refkind($v, {
@@ -2210,11 +2216,6 @@ support for the { operator => \["...", @bind] } construct (to embed literal SQL
 
 =item *
 
-added official support for -nest1, -nest2 or -nest_1, -nest_2, ...
-(undocumented in previous versions)
-
-=item *
-
 optional support for L<array datatypes|/"Inserting and Updating Arrays">
 
 =item *