The use of $_[1] was for performance reasons -- it saves copying the
function argument to a new reference.  However if the latter causes
bugs, which seems to be the case, then +1 for that patch!

--j.

On Tue, Mar 22, 2011 at 14:00, Matt Elson
<[email protected]> wrote:
> (Yes, I'm replying to my own email; bad habit of mine).
>
> Poked around a bit more and found that if I do away with the $_ stuff
> within the function that seems to work.  Like I said I've never really
> understood it, but my guess is something's phishy there.
>
> Patch attached fixes the issue for me entirely while maintaining the
> ability for the rule to hit multiple times on a single line, though I'm
> sure there might be a better way and am curious as to why simple
> reassignment fixes it.  No idea if it meets the general coding
> standards/practices; mostly just meant as a "hey this seems to fix the
> problem" patch :P.
>
> Once I apply this patch - all regexes (original ones, trivial ones, new
> ones you've been cooking) *no longer* trigger the loop.  Huzzah.
>
> Matt
>
>
>
>
>
>
> --
>  Matt Elson
>  [email protected]
>
>

Reply via email to