Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Synopsis CPAN distribution.

Report information
The Basics
Id: 69438
Status: resolved
Priority: 0/
Queue: Test-Synopsis

People
Owner: Nobody in particular
Requestors: RWSTAUNER [...] cpan.org
Cc:
AdminCc:

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



Subject: heredocs fail to terminate because of the leading space for verbatim blocks
Including a heredoc in the synopsis causes a "Can't find string terminator" error when the code in the synopsis is in a verbatim block. The problem is obvious: the code is compiled with the leading spaces but the author usually pretends they aren't there so there's a disjoint between the heredoc start token and end token. Trimming the entire block might could be problematic since the leading space is arbitrary (though trimming the whole block to the leading space of the first line seems reasonable). Changing my heredoc from $string = <<HERE; to $string = <<' HERE'; works just fine (I indent with 2 spaces), though it would probably cease working if this "bug" were ever fixed. Though since this really should be an xt (release) test breaking backward compatibility might not be so bad. So mostly I just wanted to document the limitation and possible workaround in case somebody else runs into it.
Thanks for the report. I fixed the issue (using the first line as the indent ruler and mentioned the fact in the docs). Patched version pushed to the repo (zoffix/fix-all-RT-bugs branch). Will release to CPAN soon. -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]
Resolved in version 0.7 which is now on CPAN: https://metacpan.org/release/ZOFFIX/Test-Synopsis-0.07 -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]