Skip Menu |

This queue is for tickets about the PPR CPAN distribution.

Report information
The Basics
Id: 132411
Status: resolved
Priority: 0/
Queue: PPR

People
Owner: Nobody in particular
Requestors: albert.tests [...] gmail.com
Cc:
AdminCc:

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



Subject: Error in code handed to decomment caught properly into PPR::ERROR
Date: Thu, 23 Apr 2020 19:19:47 +0200
To: bug-PPR [...] rt.cpan.org
From: Albert <albert.tests [...] gmail.com>
When we have a problem with a syntax error in it the PPR code normally would define the PPR::ERROR, but some types of problems are not caught, i.e. the method PPR::decomment returns nothing, but also PPR::ERROR is not defined. Such a situation is (note the 2 closing curly brackets of is_top_level0, the open statements are not a problem, but a result of other tests): sub is_top_level0 { # with comment my $function = ""; return $function; } } open (DFILE, $diff) or die "SHOULD NOT BE PRESENT!!!!!!!!!!!!!!!1"; sub is_top_level1 { my $function = ""; return $function; } open (DFILE, $diff) or die "SHOULD NOT BE PRESENT!!!!!!!!!!!!!!!"; and the used code: my $aFileData = read_file($sFilename); $aFileData =~ s/\r$//g; my @aRawFileData= split /(?<=\n)/, $aFileData; $self->{'_aRawFileData'} = \@aRawFileData; my $aUncommentFileData_tmp = PPR::decomment(join($", $aFileData)); if (defined($PPR::ERROR)) { $self->{'_aUncommentFileData'} = \@aRawFileData; } else { my @aUncommentFileData = split /(?<=\n)/, $aUncommentFileData_tmp; $self->{'_aUncommentFileData'} = \@aUncommentFileData; } here the $aUncommentFileData_tmp is undefined after the call to PPR::decomment. <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Subject: Re: [rt.cpan.org #132411] Error in code handed to decomment caught properly into PPR::ERROR
Date: Fri, 24 Apr 2020 04:45:14 +0000
To: bug-PPR [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Thanks for the report, Albert. This issue has not been fixed within decomment() in the latest release (version 0.00026). I have also added a new grammar rule: (?&PerlEntireDocument) that can be used to detect similar trailing errors in other parsing contexts. Much appreciated. Damian
Subject: Re: [rt.cpan.org #132411] Error in code handed to decomment caught properly into PPR::ERROR
Date: Fri, 24 Apr 2020 13:21:14 +0200
To: bug-PPR [...] rt.cpan.org
From: Albert <albert.tests [...] gmail.com>
Thanks for the very fast update, as far as I can see it works as expected (although the comment suggested to me a bit that it hasn't been fixed in decomment ??) <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virus-free. www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Fri, Apr 24, 2020 at 6:46 AM damian@conway.org via RT < bug-PPR@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=132411 > > > Thanks for the report, Albert. > > This issue has not been fixed within decomment() > in the latest release (version 0.00026). > > I have also added a new grammar rule: (?&PerlEntireDocument) > that can be used to detect similar trailing errors in other parsing > contexts. > > Much appreciated. > > Damian > >
Subject: Re: [rt.cpan.org #132411] Error in code handed to decomment caught properly into PPR::ERROR
Date: Fri, 24 Apr 2020 11:24:53 +0000
To: bug-PPR [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> (although the comment suggested to me a bit that it hasn't been fixed in > decomment ??)
Show quoted text
> > This issue has not been fixed within decomment() > > in the latest release (version 0.00026).
s/not/now/ :-) Damian