use mro 'c3';
use DBIx::Class::Carp;
-use Scalar::Util 'looks_like_number';
use Try::Tiny;
use namespace::clean;
and
$bindattrs->[$_] eq DBI::SQL_INTEGER()
and
- ! looks_like_number ($bind->[$_][1])
+ $bind->[$_][1] !~ /^ [\+\-]? [0-9]+ (?: \. 0* )? $/x
) {
carp_unique( sprintf (
- "Non-numeric value supplied for column '%s' despite the numeric datatype",
+ "Non-integer value supplied for column '%s' despite the integer datatype",
$bind->[$_][0]{dbic_colname} || "# $_"
) );
undef $bindattrs->[$_];
# make sure the side-effects of RT#67581 do not result in data loss
my $row;
warnings_exist { $row = $schema->resultset('Artist')->create ({ name => 'alpha rank', rank => 'abc' }) }
- [qr/Non-numeric value supplied for column 'rank' despite the numeric datatype/],
+ [qr/Non-integer value supplied for column 'rank' despite the integer datatype/],
'proper warning on string insertion into an numeric column'
;
$row->discard_changes;