Skip Menu |
 

This queue is for tickets about the SQL-Abstract CPAN distribution.

Report information
The Basics
Id: 125760
Status: new
Priority: 0/
Queue: SQL-Abstract

People
Owner: Nobody in particular
Requestors: fabrizio.ge [...] tiscali.it
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: ilmari [...] ilmari.org
MIME-Version: 1.0
X-Spam-Status: No, score=-1.234 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, SPF_SOFTFAIL=0.665] autolearn=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Ziggo-Spamscore: 0.0
X-Spam-Flag: NO
Content-Language: en-US
X-Ziggo-Spamreport: CMAE Analysis: v=2.3 cv=bNii382Z c=1 sm=1 tr=0 a=Y9naLM2OsIrLNHfBNfqgaw==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=Q9fys5e9bTEA:10 a=R9QF1RCXAYgA:10 a=NEAV23lmAAAA:8 a=nNEQNo2FUAcrgE2oySoA:9 a=PUjeQqilurYA:10 none
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <26760640-82b8-b4f9-c114-6286cbf1f416 [...] tiscali.it>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Ziggo-Spambar: /
X-Spam-Score: -1.234
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 137952403B0 for <cpan-bug+SQL-Abstract [...] hipster.bestpractical.com>; Thu, 5 Jul 2018 02:27:09 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BcS4AxnP1CCE for <cpan-bug+SQL-Abstract [...] hipster.bestpractical.com>; Thu, 5 Jul 2018 02:27:08 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id C0BDA24037E for <bug-SQL-Abstract [...] rt.cpan.org>; Thu, 5 Jul 2018 02:27:07 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 6EEBD122656 for <bug-SQL-Abstract [...] rt.cpan.org>; Wed, 4 Jul 2018 23:27:06 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 6C568122661 for <bug-SQL-Abstract [...] rt.cpan.org>; Wed, 4 Jul 2018 23:27:01 -0700 (PDT)
Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 0A3E311D41B for <bug-SQL-Abstract [...] rt.cpan.org>; Wed, 4 Jul 2018 23:26:50 -0700 (PDT)
Received: from [212.54.42.137] (helo=smtp6.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtp (Exim 4.86_2) (envelope-from <fabrizio.ge [...] tiscali.it>) id 1faxOH-00018l-Ow; Thu, 05 Jul 2018 08:05:17 +0200
Received: from dhcp-089-099-149-095.chello.nl ([89.99.149.95] helo=[192.168.178.241]) by smtp6.tb.mail.iss.as9143.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <fabrizio.ge [...] tiscali.it>) id 1faxOH-0000mg-FL; Thu, 05 Jul 2018 08:05:17 +0200
Delivered-To: cpan-bug+SQL-Abstract [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
Subject: literal string '0' is replaced by ''
Return-Path: <fabrizio.ge [...] tiscali.it>
X-RT-Mail-Extension: sql-abstract
X-Original-To: cpan-bug+SQL-Abstract [...] hipster.bestpractical.com
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, SINGLE_URI_IN_BODY 0, SPF_SOFTFAIL 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __HTTPS_URI 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __NO_HTML_TAG_RAW 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_START 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
Date: Thu, 5 Jul 2018 08:05:05 +0200
X-Authenticated-Sender: fabbo [...] ziggo.nl (via SMTP)
X-Sourceip: 89.99.149.95
X-Spam-Level:
X-Ziggo-Spam-Status: No
X-Greylist: delayed 1287 seconds by postgrey-1.34 at xx1.develooper.com; Wed, 04 Jul 2018 23:26:51 PDT
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2018.7.5.61516
To: bug-SQL-Abstract [...] rt.cpan.org
Content-Transfer-Encoding: 8bit
From: Fabrizio Gennari <fabrizio.ge [...] tiscali.it>
X-RT-Original-Encoding: iso-8859-15
X-RT-Interface: Email
Content-Length: 1145
Download (untitled) / with headers
text/plain 1.1k
In Perl, the literal string '0' is false. Because of this, if one uses the scalar ref "0", SQL::Abstract considers it a 'false' string and replaces it with an empty string. The tests below were made with version 1.85 perl -MSQL::Abstract -e 'my ($sql,@bind)=SQL::Abstract->new->where(\"1");CORE::say $sql' Value of $sql is  WHERE ( 1 ) as expected perl -MSQL::Abstract -e 'my ($sql,@bind)=SQL::Abstract->new->where(\"0");CORE::say $sql' Expected value of $sql is  WHERE ( 0 ) Actual is an empty string perl -MSQL::Abstract -e 'my ($sql,@bind)=SQL::Abstract->new->where({-bool=>\"1"});CORE::say $sql' Value of $sql is  WHERE ( 1 ) as expected perl -MSQL::Abstract -e 'my ($sql,@bind)=SQL::Abstract->new->where({-bool=>\"0"});CORE::say $sql' Expected value of $sql is  WHERE ( 0 ) Actual is an empty string Strangely it works if the hash ref has other keys as well perl -MSQL::Abstract -e 'my ($sql,@bind)=SQL::Abstract->new->where({-bool=>\"0",a=>3});CORE::say $sql' Value of $sql is WHERE ( ( 0 AND a = ? ) ) and value of @bind is (3), as expected https://github.com/dbsrgits/sql-abstract/pull/14 is meant to fix this


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.