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

People
Owner: Nobody in particular
Requestors: asuffield [...] suffields.me.uk
Cc:
AdminCc:

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



MIME-Version: 1.0
X-Spam-Status: No, hits=1.7 required=8.0 tests=RDNS_DYNAMIC,TVD_RCVD_IP
Content-Disposition: inline
content-type: text/plain; charset="utf-8"
Message-ID: <20090817105954.GA21689 [...] suffields.me.uk>
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 0F49519B81DB for <bug-Filter-Simple [...] rt.cpan.org>; Mon, 17 Aug 2009 07:00:05 -0400 (EDT)
Received: (qmail 30011 invoked by uid 103); 17 Aug 2009 11:00:05 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Aug 2009 11:00:05 -0000
Received: from 78-32-97-105.adsl24.co.uk (HELO cyclone.suffields.me.uk) (78.32.97.105) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Mon, 17 Aug 2009 03:59:59 -0700
Received: from asuffield by cyclone.suffields.me.uk with local (Exim 4.69) (envelope-from <asuffield [...] suffields.me.uk>) id 1MczwR-0005vL-3s for bug-Filter-Simple [...] rt.cpan.org; Mon, 17 Aug 2009 11:59:55 +0100
Delivered-To: cpan-bug+Filter-Simple [...] diesel.bestpractical.com
Subject: quotelike filters fail on $foo-> arguments
User-Agent: Mutt/1.5.20 (2009-06-14)
Return-Path: <asuffield [...] suffields.me.uk>
X-Original-To: bug-Filter-Simple [...] rt.cpan.org
X-Spam-Check-BY: 16.mx.develooper.com
Date: Mon, 17 Aug 2009 11:59:55 +0100
X-Spam-Level: *
To: bug-Filter-Simple [...] rt.cpan.org
From: Andrew Suffield <asuffield [...] suffields.me.uk>
X-RT-Original-Encoding: us-ascii
Content-Length: 974
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 Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.