use strict;
use warnings;
-use Module::Runtime ();
use Carp ();
use List::Util ();
use Scalar::Util ();
# GLOBALS
#======================================================================
-our $VERSION = '1.90_03';
+our $VERSION = '2.000001';
# This would confuse some packagers
$VERSION = eval $VERSION if $VERSION =~ /_/; # numify for warning-free dev releases
}
if ($opt{lazy_join_sql_parts}) {
- my $mod = Module::Runtime::use_module('SQL::Abstract::Parts');
- $opt{join_sql_parts} ||= sub { $mod->new(@_) };
+ require SQL::Abstract::Parts;
+ $opt{join_sql_parts} ||= sub { SQL::Abstract::Parts->new(@_) };
}
$opt{join_sql_parts} ||= sub { join $_[0], @_[1..$#_] };
return $self->sqlfalse unless @$v;
$self->_debug("ARRAY($k) means distribute over elements");
my $logic = lc(
- $v->[0] =~ /^-(and|or)$/i
+ ($v->[0]||'') =~ /^-(and|or)$/i
? (shift(@{$v = [ @$v ]}), $1)
: lc($self->{logic} || 'OR')
);
To get an OR instead, you can combine it with the arrayref idea:
- my %where => (
+ my %where = (
user => 'nwiger',
priority => [ { '=', 2 }, { '>', 5 } ]
);