Skip Menu |
 

This queue is for tickets about the Devel-Declare CPAN distribution.

Report information
The Basics
Id: 47544
Status: resolved
Priority: 0/
Queue: Devel-Declare

People
Owner: Nobody in particular
Requestors: zefram [...] fysh.org
Cc:
AdminCc:

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



Subject: toke_scan_str multiline fail
Date: Fri, 3 Jul 2009 15:42:37 +0100
To: bug-Devel-Declare [...] rt.cpan.org
From: Zefram <zefram [...] fysh.org>
Download (untitled) / with headers
text/plain 594b
The attached test script illustrates some ways in which I've seen toke_scan_str fail when parsing across multiple lines. I get these test results: single_with_filler: success (this is the control case) single_no_filler: forced to realloc PL_linestr (not a multiline issue) newline0: suprising len=-12 newline1: suprising len=-11 newline2: success newline3: success three_line: content length doesn't match len The newline-related faults occur when parsing code from a file or from -e, but not in a string eval. Hence the test script puts the code under test into a temporary file. -zefram
Download scanstr_test.t
text/x-perl 2.2k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 158b
Think I was mistaken about how toke_scan_str is meant to be used. It *is* damned confusing, but it can be used correctly (as I do in ork codebase). -zefram
Download (untitled) / with headers
text/plain 158b
On third thoughts: actually the way I use it correctly at work is to not use toke_scan_str but to reimplement it by char-by-char parsing. There is a problem.
Fixed in Devel-Declare 0.006007, just uploaded to CPAN.


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.