Skip Menu |
 

This queue is for tickets about the Acme-Comment CPAN distribution.

Report information
The Basics
Id: 1443
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Acme-Comment

People
Owner: BINGOS [...] cpan.org
Requestors: briac [...] pilpre.com
Cc:
AdminCc:

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



Subject: Comments inside heredocs
Download (untitled) / with headers
text/plain 512b
With Acme::Comment 1.0 and 1.01 (perl 5.8, linux), if there is something that looks like a comment in a here-document, it gets parsed as a comment instead of being treated as a normal string. Example: #!/usr/bin/perl use Acme::Comment type => 'C++', own_line => 1, one_line => 0; my $foo= <<"_FOO_"; /* foo */ _FOO_ my $bar = <<"_BAR_"; // bar _BAR_ my $baz = <<"_BAZ_"; /* baz */ _BAZ_ print "$foo$bar$baz"; # prints '/* baz */' __END__ I think it should have printed: /* foo */ // bar /* baz */
Subject: Comments inside heredocs
Download (untitled) / with headers
text/plain 512b
With Acme::Comment 1.0 and 1.01 (perl 5.8, linux), if there is something that looks like a comment in a here-document, it gets parsed as a comment instead of being treated as a normal string. Example: #!/usr/bin/perl use Acme::Comment type => 'C++', own_line => 1, one_line => 0; my $foo= <<"_FOO_"; /* foo */ _FOO_ my $bar = <<"_BAR_"; // bar _BAR_ my $baz = <<"_BAZ_"; /* baz */ _BAZ_ print "$foo$bar$baz"; # prints '/* baz */' __END__ I think it should have printed: /* foo */ // bar /* baz */
Download (untitled) / with headers
text/plain 103b
Text::Balanced 1.95 solves this problem. And 1.97 removed $&. -- Alexandr Ciornii, http://chorny.net
Subject: Re: [rt.cpan.org #1443] Comments inside heredocs
Date: Tue, 29 May 2007 13:10:56 +0200
To: bug-Acme-Comment [...] rt.cpan.org
From: "Jos I. Boumans" <kane [...] cpan.org>
Download (untitled) / with headers
text/plain 363b
On 29 May 2007, at 13:03, Alexandr Ciornii via RT wrote: Show quoted text
> > Queue: Acme-Comment > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=1443 > > > Text::Balanced 1.95 solves this problem. And 1.97 removed $&.
Thanks for your insight! If you have a patch, that's very welcome of course. Otherwise, i'll take a look in the near future. Cheers, Jos
Download (untitled) / with headers
text/plain 449b
On May 29 07:14:49 2007, KANE wrote: Show quoted text
> On 29 May 2007, at 13:03, Alexandr Ciornii via RT wrote:
Show quoted text
> > Text::Balanced 1.95 solves this problem. And 1.97 removed $&.
Sorry, 1.97 and 1.99. Show quoted text
> If you have a patch, that's very welcome of course. Otherwise, > i'll take a look in the near future.
Patch is simple - add 'Text::Balanced' => 1.99, #heredoc and $& in Makefile.PL / WriteMakefile / PREREQ_PM -- Alexandr Ciornii, http://chorny.net
RT-Send-CC: alexchorny [...] gmail.com
Released a new version to CPAN with the recommended PREREQ. Cheers.


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.