From: Dagfinn Ilmari Mannsåker Date: Tue, 8 Oct 2013 12:02:23 +0000 (+0100) Subject: Warn about non-integer values for all integer bind types, not just SQL_INTEGER X-Git-Tag: v0.08260~128 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d830d9f4a137fa7ce6c14fe929a67951c4170b9e;p=dbsrgits%2FDBIx-Class.git Warn about non-integer values for all integer bind types, not just SQL_INTEGER --- diff --git a/lib/DBIx/Class/Storage/DBI/SQLite.pm b/lib/DBIx/Class/Storage/DBI/SQLite.pm index 9bd51a4..4ce820c 100644 --- a/lib/DBIx/Class/Storage/DBI/SQLite.pm +++ b/lib/DBIx/Class/Storage/DBI/SQLite.pm @@ -273,7 +273,9 @@ sub _dbi_attrs_for_bind { and defined $bind->[$i][1] and - $bindattrs->[$i] eq DBI::SQL_INTEGER() + grep { $bindattrs->[$i] eq $_ } ( + DBI::SQL_INTEGER(), DBI::SQL_TINYINT(), DBI::SQL_SMALLINT(), DBI::SQL_BIGINT() + ) and $bind->[$i][1] !~ /^ [\+\-]? [0-9]+ (?: \. 0* )? $/x ) {