Skip Menu |

This queue is for tickets about the Filter-Simple CPAN distribution.

Report information
The Basics
Id: 48767
Status: new
Priority: 0/
Queue: Filter-Simple

Owner: Nobody in particular
Requestors: asuffield [...]

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

Subject: quotelike filters fail on $foo-> arguments
Date: Mon, 17 Aug 2009 11:59:55 +0100
To: bug-Filter-Simple [...]
From: Andrew Suffield <asuffield [...]>
Download (untitled) / with headers
text/plain 974b
The following doesn't work, with no obvious "ambiguous parsing" reasons: ---8<--- use Filter::Simple::FilterOnlyQuotelikeTest qr/not ok/ => "ok"; my $i = sub { print "$_[0]\n" }; $i->("not ok 11"); ---8<--- Where the filter is the one from t/lib/ with 'string' changed to 'quotelike'. Hence, it's supposed to be mangling the quoted string. ---8<--- package Filter::Simple::FilterOnlyQuotelikeTest; use Filter::Simple; FILTER_ONLY quotelike => sub { my $class = shift; while (my($pat, $str) = splice @_, 0, 2) { s/$pat/$str/g; } }; ---8<--- A quick investigation indicates that Text::Balanced is not considering the string to be a match, because extract_variable is greedily consuming the whole function call, so the arguments are not available for further matching. It's not apparent why this is being used here and not in string matches - I would expect the two to be almost identical, and vary only in what is passed to the filter, not what they match.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to