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>
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

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

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
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.