Skip Menu |
 

This queue is for tickets about the File-Slurp CPAN distribution.

Report information
The Basics
Id: 87887
Status: resolved
Priority: 0/
Queue: File-Slurp

People
Owner: Nobody in particular
Requestors: unlearned [...] gmail.com
Cc:
AdminCc:

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



From unlearned [...] gmail.com Thu Aug 15 17: 54:54 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.334 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
Message-ID: <CAHf=kdAO7=FpUQgF0Hf3E2_F5ROqj76btAuAXPENQceW_ev71Q [...] mail.gmail.com>
X-Received: by 10.180.211.7 with SMTP id my7mr3135604wic.26.1376603683741; Thu, 15 Aug 2013 14:54:43 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.334
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 9CA6C61E00E for <cpan-bug+File-Slurp [...] hipster.bestpractical.com>; Thu, 15 Aug 2013 17:54:54 -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 4Um4CV7sjQ-T for <cpan-bug+File-Slurp [...] hipster.bestpractical.com>; Thu, 15 Aug 2013 17:54:53 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 02FBF61E00D for <bug-File-Slurp [...] rt.cpan.org>; Thu, 15 Aug 2013 17:54:52 -0400 (EDT)
Received: (qmail 25384 invoked by alias); 15 Aug 2013 21:54:52 -0000
Received: from mail-we0-f176.google.com (HELO mail-we0-f176.google.com) (74.125.82.176) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 15 Aug 2013 14:54:48 -0700
Received: by mail-we0-f176.google.com with SMTP id t59so897114wes.35 for <bug-File-Slurp [...] rt.cpan.org>; Thu, 15 Aug 2013 14:54:43 -0700 (PDT)
Received: by 10.194.191.161 with HTTP; Thu, 15 Aug 2013 14:54:43 -0700 (PDT)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+File-Slurp [...] hipster.bestpractical.com
Subject: Newlines stripped from queries
Return-Path: <unlearned [...] gmail.com>
X-RT-Mail-Extension: file-slurp
X-Original-To: cpan-bug+File-Slurp [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=AcZLlNBYcVLfpW0INjBz8zR6UnyrGubVF0kf2DH4ej8=; b=uZSLVT/M1Dazxz9LEG29EtereD2VcP9UeiQJ8XV6xoOr9Ec604oF2pdIhI4+ve0+XI iQOKgKp7zg+9YrnkI+tgaCQa+8VD9ldIP9W/BeM7VpiyKURJ4CL1gq/swJm5AAwDvQ0l ohKDwm1VZfMEtHSRO52Nv1yY9LXG9TNB1ZmQmwWsm4pt/VANytp6VAaUBRuKAofrQXJT 8zdhuy+Tpuo0hfEISY4dBXYjN9LnKpR4iS1StUKiCay5FI3MlXYJ4mXzX0ymxDQtIZui ecT/KCIl2vXyG+1ckJjaXgYS1JzUrVn9WjTR3xy4fnOHy1eoTzdZMg0ROi1xYXXVWtri 5dXA==
Date: Thu, 15 Aug 2013 21:54:43 +0000
X-Spam-Level:
To: bug-File-Slurp [...] rt.cpan.org
From: Daniel Fackrell <unlearned [...] gmail.com>
X-RT-Original-Encoding: iso-8859-1
X-RT-Interface: Email
Content-Length: 820
Download (untitled) / with headers
text/plain 820b
File::Slurp's new() splits on newlines, and then inserts the lines of the query without adding them back in. The resulting query when called later is a single line. This causes problems with queries that contain SQL-style comments (though three other types of comments work well), as the rest of the query from that point is considered a comment. While three other types of comments are recognized by the parsing in this module, comments beginning with '--' should work and be passed to the SQL server without modification. Recommended fix: Change: if ( $curr_name ) { $self->{'contents'}->{$curr_name} .= $_; } To: if ( $curr_name ) { $self->{'contents'}->{$curr_name} .= $_ . "\n"; } This adds the newline back to the end of each line.
From unlearned [...] gmail.com Thu Aug 15 17: 57:47 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.334 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
In-Reply-To: <rt-4.0.16-31941-1376603695-16.87887-3-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87887 [...] rt.cpan.org> <CAHf=kdAO7=FpUQgF0Hf3E2_F5ROqj76btAuAXPENQceW_ev71Q [...] mail.gmail.com> <rt-4.0.16-31941-1376603695-16.87887-3-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.180.187.113 with SMTP id fr17mr3136714wic.7.1376603855033; Thu, 15 Aug 2013 14:57:35 -0700 (PDT)
Message-ID: <CAHf=kdDusM0Hzs4MsRujwYk34XM0rQowsn1+xO93Ftw4gvsBHQ [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.334
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 366F261E00D for <cpan-bug+File-Slurp [...] hipster.bestpractical.com>; Thu, 15 Aug 2013 17:57:47 -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 7y35WyOLrQ6y for <cpan-bug+File-Slurp [...] hipster.bestpractical.com>; Thu, 15 Aug 2013 17:57:46 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id F08752410AE for <bug-File-Slurp [...] rt.cpan.org>; Thu, 15 Aug 2013 17:57:45 -0400 (EDT)
Received: (qmail 25542 invoked by alias); 15 Aug 2013 21:57:45 -0000
Received: from mail-we0-f170.google.com (HELO mail-we0-f170.google.com) (74.125.82.170) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 15 Aug 2013 14:57:39 -0700
Received: by mail-we0-f170.google.com with SMTP id w60so1052380wes.29 for <bug-File-Slurp [...] rt.cpan.org>; Thu, 15 Aug 2013 14:57:35 -0700 (PDT)
Received: by 10.194.191.161 with HTTP; Thu, 15 Aug 2013 14:57:34 -0700 (PDT)
Delivered-To: cpan-bug+File-Slurp [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87887] AutoReply: Newlines stripped from queries
Return-Path: <unlearned [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6lIdf8Gpl9JLPFXCW0d2bu7a+i6vCLujRhPqKRvQXQY=; b=s00AzmuhAF3f13jtrMZ7lte4hktaj2QirHEEdVNm6o9g8jG2LgY4Wc9Q0DFHI4NuNj dzTp71S4isW1VQTGv0T1TmaYJa979mAto1DFuc0wvdiQOY3yTS2I2cSOtjitv7z0Rd4a naRkq+Xc91rPnNjfYfH+yghxGJ5h0yoVQOJIdf8l3o3JSRSqJ6NwRt25b7cLKNZ1Y1bd EXSUsvX12b3Tu5dXaR9HW+0TaK/qP8Z2g2UWwNc8kJpAZYpl3BkDnQh/of9JCon7vqBs QuEennpk9Lsl+nabEB2l54eE/tMxUZ85p4XdJBztA5JyeC+Fn0g26ApkwpHSEDzVy5Lo Ds+A==
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+File-Slurp [...] hipster.bestpractical.com
X-RT-Mail-Extension: file-slurp
Date: Thu, 15 Aug 2013 21:57:34 +0000
X-Spam-Level:
To: bug-File-Slurp [...] rt.cpan.org
From: Daniel Fackrell <unlearned [...] gmail.com>
RT-Message-ID: <rt-4.0.16-20119-1376603867-1215.87887-0-0 [...] rt.cpan.org>
Content-Length: 1835
Download (untitled) / with headers
text/plain 1.7k
Sorry, this should have been for SQL::Library. Can it be moved, or do I need to resubmit? On Thu, Aug 15, 2013 at 9:54 PM, Bugs in File-Slurp via RT <bug-File-Slurp@rt.cpan.org> wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Newlines stripped from queries", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #87887]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=87887 > > Please include the string: > > [rt.cpan.org #87887] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-File-Slurp@rt.cpan.org > > ------------------------------------------------------------------------- > File::Slurp's new() splits on newlines, and then inserts the lines of > the query without adding them back in. The resulting query when > called later is a single line. > > This causes problems with queries that contain SQL-style comments > (though three other types of comments work well), as the rest of the > query from that point is considered a comment. > > While three other types of comments are recognized by the parsing in > this module, comments beginning with '--' should work and be passed to > the SQL server without modification. > > Recommended fix: > > Change: > > if ( $curr_name ) > { > $self->{'contents'}->{$curr_name} .= $_; > } > > To: > > if ( $curr_name ) > { > $self->{'contents'}->{$curr_name} .= $_ . "\n"; > } > > > This adds the newline back to the end of each line.
From unlearned [...] gmail.com Thu Aug 15 22: 22:42 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.334 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
In-Reply-To: <CAHf=kdDusM0Hzs4MsRujwYk34XM0rQowsn1+xO93Ftw4gvsBHQ [...] mail.gmail.com>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87887 [...] rt.cpan.org> <CAHf=kdAO7=FpUQgF0Hf3E2_F5ROqj76btAuAXPENQceW_ev71Q [...] mail.gmail.com> <rt-4.0.16-31941-1376603695-16.87887-3-0 [...] rt.cpan.org> <CAHf=kdDusM0Hzs4MsRujwYk34XM0rQowsn1+xO93Ftw4gvsBHQ [...] mail.gmail.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.194.109.164 with SMTP id ht4mr34631wjb.35.1376619748435; Thu, 15 Aug 2013 19:22:28 -0700 (PDT)
Message-ID: <CAHf=kdAxJej823DnXLxYBO-+4NP-2gBwY39maCRdXwY_7xTqeg [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.334
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 2B54661E00D for <cpan-bug+File-Slurp [...] hipster.bestpractical.com>; Thu, 15 Aug 2013 22:22:42 -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 r33hfT+g1HFN for <cpan-bug+File-Slurp [...] hipster.bestpractical.com>; Thu, 15 Aug 2013 22:22:41 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 0973D2410AE for <bug-File-Slurp [...] rt.cpan.org>; Thu, 15 Aug 2013 22:22:40 -0400 (EDT)
Received: (qmail 11487 invoked by alias); 16 Aug 2013 02:22:40 -0000
Received: from mail-wg0-f47.google.com (HELO mail-wg0-f47.google.com) (74.125.82.47) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 15 Aug 2013 19:22:33 -0700
Received: by mail-wg0-f47.google.com with SMTP id j13so1104050wgh.26 for <bug-File-Slurp [...] rt.cpan.org>; Thu, 15 Aug 2013 19:22:28 -0700 (PDT)
Received: by 10.194.191.161 with HTTP; Thu, 15 Aug 2013 19:22:28 -0700 (PDT)
Delivered-To: cpan-bug+File-Slurp [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87887] AutoReply: Newlines stripped from queries
Return-Path: <unlearned [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=M9ZLJQIy+1uzahu1Kj555wqGUV1dS7sUrGYVgfNC+JI=; b=0dTHvL2MWKGDtpYheQn2X6liyHu+jp5g9nQlcjH3rVXLBdYJqXcIzUGS2ZMBz0HQoU 31HkX2LrNNOxXz5nEnDNHlROFwcKBRxUwERnb8FwreBKhTk/kzhmJPDlbc6FooA9B61G P0lJOEutQW69r5xndZH2CiTupIASewR8+5zH7mG+mRrTL0UNsOdhtgzmMaK4rdNXW1a2 fFu4ViqaG4Uv0RxS26NU9Mf6BkLoq6HkMjU10JcvcxFx6w/BNzZ0grGjYZ5sEtVKJEOx 47/EeTPLZ9YXU46jdCsVyEadmxARgYMM+io7j1Is7NOjL/93JnOr8imYG6u/3kj0stWT N04w==
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+File-Slurp [...] hipster.bestpractical.com
X-RT-Mail-Extension: file-slurp
Date: Fri, 16 Aug 2013 02:22:28 +0000
X-Spam-Level:
To: bug-File-Slurp [...] rt.cpan.org
From: Daniel Fackrell <unlearned [...] gmail.com>
RT-Message-ID: <rt-4.0.16-11623-1376619762-1900.87887-0-0 [...] rt.cpan.org>
Content-Length: 2089
This has been re-submitted to the correct email address, and can be closed here. Sorry for the inconvenience. On Thu, Aug 15, 2013 at 9:57 PM, Daniel Fackrell <unlearned@gmail.com> wrote: Show quoted text
> Sorry, this should have been for SQL::Library. Can it be moved, or do > I need to resubmit? > > On Thu, Aug 15, 2013 at 9:54 PM, Bugs in File-Slurp via RT > <bug-File-Slurp@rt.cpan.org> wrote:
>> >> Greetings, >> >> This message has been automatically generated in response to the >> creation of a trouble ticket regarding: >> "Newlines stripped from queries", >> a summary of which appears below. >> >> There is no need to reply to this message right now. Your ticket has been >> assigned an ID of [rt.cpan.org #87887]. Your ticket is accessible >> on the web at: >> >> https://rt.cpan.org/Ticket/Display.html?id=87887 >> >> Please include the string: >> >> [rt.cpan.org #87887] >> >> in the subject line of all future correspondence about this issue. To do so, >> you may reply to this message. >> >> Thank you, >> bug-File-Slurp@rt.cpan.org >> >> ------------------------------------------------------------------------- >> File::Slurp's new() splits on newlines, and then inserts the lines of >> the query without adding them back in. The resulting query when >> called later is a single line. >> >> This causes problems with queries that contain SQL-style comments >> (though three other types of comments work well), as the rest of the >> query from that point is considered a comment. >> >> While three other types of comments are recognized by the parsing in >> this module, comments beginning with '--' should work and be passed to >> the SQL server without modification. >> >> Recommended fix: >> >> Change: >> >> if ( $curr_name ) >> { >> $self->{'contents'}->{$curr_name} .= $_; >> } >> >> To: >> >> if ( $curr_name ) >> { >> $self->{'contents'}->{$curr_name} .= $_ . "\n"; >> } >> >> >> This adds the newline back to the end of each line.


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.