Skip Menu |

This queue is for tickets about the PPR CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: haukex [...] zero-g.net
Cc:
AdminCc:

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



Subject: PerlSubroutineDeclaration doesn't match "DESTROY {...}"
Hi, "(?<PerlSubroutineDeclaration>" doesn't match "DESTROY {}", but does match "DESTROY{}". I believe it's missing a (?&PerlOWS) after "AUTOLOAD" and "DESTROY" - compare to "Inlined (?&PerlSubroutineDeclaration)" in "(?<PerlStatement>". On the other hand, PerlSubroutineDeclaration does match against "&DESTROY();", I'm not sure if that's a bug or just a limitation of regexes. Thanks for the great module! Regards, -- Hauke D
Subject: Re: [rt.cpan.org #123144] PerlSubroutineDeclaration doesn't match "DESTROY {...}"
Date: Thu, 28 Sep 2017 21:38:40 +1000
To: bug-PPR [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> "(?<PerlSubroutineDeclaration>" doesn't match "DESTROY {}", but does
match "DESTROY{}". I believe it's missing a (?&PerlOWS) after "AUTOLOAD" and "DESTROY" - compare to "Inlined (?&PerlSubroutineDeclaration)" in "(?<PerlStatement>". Definitely a bug. Thanks for reporting it. Now patched. Show quoted text
> On the other hand, PerlSubroutineDeclaration does match against
"&DESTROY();", Show quoted text
> I'm not sure if that's a bug or just a limitation of regexes.
It actually only matches against the "DESTROY();" substring. Because that's not a subroutine call; it's a valid declaration of a destructor subroutine, with a no-argument prototype! Damian
Subject: Re: [rt.cpan.org #123144] PerlSubroutineDeclaration doesn't match "DESTROY {...}"
Date: Fri, 29 Sep 2017 09:36:51 +0200
To: bug-PPR [...] rt.cpan.org
From: Hauke D <haukex [...] zero-g.net>
Hi, Thanks for the quick fix! And indeed, when matching "&DESTROY();" I should have anchored it - "&DESTROY()" does match (?&PerlCall). Regards, -- Hauke D On 28.09.2017 13:39, damian@conway.org via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=123144 > >
>> "(?<PerlSubroutineDeclaration>" doesn't match "DESTROY {}", but does
> match "DESTROY{}". I believe it's missing a (?&PerlOWS) after "AUTOLOAD" > and "DESTROY" - compare to "Inlined (?&PerlSubroutineDeclaration)" in > "(?<PerlStatement>". > > Definitely a bug. Thanks for reporting it. Now patched. > >
>> On the other hand, PerlSubroutineDeclaration does match against
> "&DESTROY();",
>> I'm not sure if that's a bug or just a limitation of regexes.
> > It actually only matches against the "DESTROY();" substring. > Because that's not a subroutine call; it's a valid declaration > of a destructor subroutine, with a no-argument prototype! > > Damian > >