Open
Description
This seems like it's a bad thing, because writing use v5.40;
on a script doesn't let you override the true
& false
builtins afterwards by using something like use Mojo::JSON qw/ true false /;
, nor with no builtin qw/ true false /
, so we're all stuck with v5.40's builtin boolean values, and maybe you should consider this.
DBD::Pg thinks false
is an empty string, and PostgreSQL returns an error:
My example script:
#!/usr/bin/env perl
use v5.40;
use FindBin '$RealBin';
use lib "$RealBin/local/lib/perl5";
use DBI;
my $dbh = DBI->connect('dbi:Pg:dbname=dbname;host=127.0.0.1', 'user', 'pass', {AutoCommit => 1});
$dbh->do('INSERT INTO "foo" ("value") VALUES (?)', undef, false);
Output:
DBD::Pg::db do failed: ERROR: invalid input syntax for type boolean: ""
CONTEXT: unnamed portal parameter $1 = '' at ./true_false.pl line 11.
Metadata
Metadata
Assignees
Labels
No labels