Skip Menu |
 

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

Report information
The Basics
Id: 87887
Status: new
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)



Subject: Newlines stripped from queries
Date: Thu, 15 Aug 2013 21:54:43 +0000
To: bug-File-Slurp [...] rt.cpan.org
From: Daniel Fackrell <unlearned [...] gmail.com>
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.
Subject: Re: [rt.cpan.org #87887] AutoReply: Newlines stripped from queries
Date: Thu, 15 Aug 2013 21:57:34 +0000
To: bug-File-Slurp [...] rt.cpan.org
From: Daniel Fackrell <unlearned [...] gmail.com>
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.
Subject: Re: [rt.cpan.org #87887] AutoReply: Newlines stripped from queries
Date: Fri, 16 Aug 2013 02:22:28 +0000
To: bug-File-Slurp [...] rt.cpan.org
From: Daniel Fackrell <unlearned [...] gmail.com>
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.