Skip Menu |
Report information
Id: 92438
Status: rejected
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: chm <chm [at]>

Operating System: cygwin
PatchStatus: (no value)
Severity: medium
  • library
  • sendToCPAN
Perl Version: 5.10.1
Fixed In: (no value)

Subject: Text::Balanced confused by /= vs m// without the m
Date: Tue, 07 Jun 2011 21:51:36 -0400
To: perlbug [...]
From: chm <devel.chm.01 [...]>
Download (untitled) / with headers
text/plain 4.7k
This is a bug report for perl from, generated with the help of perlbug 1.39 running under perl 5.10.1. ----------------------------------------------------------------- Using Filter::Simple with the FILTER_ONLY option failed because the call to extract_quotelike() matched a pair of lines with /= in them as a single implicit m// construct: Show quoted text
> $ cat > package badfilter; > > use Filter::Simple; > > FILTER_ONLY > code_no_comments => > # all => > sub { > s/(\w+):\$/$1,\$/; > }; > > 1;
Show quoted text
> $ cat > use badfilter; > > $b /= 1; > > $lu->($row:$n1,$r1); > > $b /= 1;
I don't know how one could differentiate between the two cases although in this instance it would seem that not assuming a / is part of an implicit match operator (without the m) when it is followed immediately by an = sight might be appropriate. I was able to work around the problem by hardwiring the $allow_raw_match for _match_quotelike() to 0. I could not find a way that the needed functionality was directly exposed nor am I sure of the consequences of this change. Regards, Chris [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=library severity=medium module=Text::Balanced --- Site configuration information for perl 5.10.1: Configured by rurban at Sat Aug 28 20:14:06 CEST 2010. Platform: osname=cygwin, osvers=1.7.5(0.22553), archname=i686-cygwin-thread-multi-64int uname='cygwin_nt-5.1 reini 1.7.5(0.22553) 2010-04-12 19:07 i686 cygwin ' config_args='-de -Dlibperl=cygperl5_10.dll -Dcc=gcc-4 -Dld=g++-4 -Dmksymlinks -Dusethreads -Dmad=y -Doptimize=-O3 -Accflags=-g3' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='gcc-4', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include', optimize='-O3', cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.3.4 20090804 (release) 1', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++-4', ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat perllibs=-ldl -lcrypt libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=cygperl5_10.dll gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector' Locally applied patches: CYG11 no-bs CYG12 no archlib in otherlibdirs CYG14 Dynaloader CYG15 static-Win32CORE CYG17 utf8-paths CYG21 LibList-Kid.patch CYG22 cygwin-1.7 hints CYG23 544-stat CYG24 build man pages CYG25 rebase_privlib Module-Build-0.36_13 Bug#55162 CYG18 File::Spec::case_tolerant performance disable ExtUtils::MakeMaker::Coverage in Sys-Syslog --- @INC for perl 5.10.1: /home/chm/perl/lib/i686-cygwin-thread-multi-64int /home/chm/perl/lib /usr/lib/perl5/5.10/i686-cygwin /usr/lib/perl5/5.10 /usr/lib/perl5/site_perl/5.10/i686-cygwin /usr/lib/perl5/site_perl/5.10 /usr/lib/perl5/vendor_perl/5.10/i686-cygwin /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/vendor_perl/5.10 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 . --- Environment for perl 5.10.1: HOME=/home/chm LANG=C.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/pgplot:/usr/local/pgplot:/home/chm/perl/bin:/usr/lib/qt3/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/Program Files/DisplayLink Core Software/:/cygdrive/c/strawberry/c/bin:/cygdrive/c/strawberry/perl/bin:/cygdrive/c/Program Files/QuickTime/QTSystem/:/usr/lib/lapack PERL5LIB=/home/chm/perl/lib PERLDOC_PAGER=less PERL_BADLANG (unset) SHELL (unset)
Subject: Re: [perl #92438] Text::Balanced confused by /= vs m// without the m
Date: Mon, 13 Jun 2011 09:40:25 -0400
To: perlbug-followup [...]
From: Chris Marshall <devel.chm.01 [...]>
Download (untitled) / with headers
text/plain 293b
A follow up note: I was able to work around the problem by overriding Text::Balanced::extract_quotelike with the same code just with $allow_raw_match=0 in the call to _match_quotelike(). It would be use expose the options to _match_quoteliek() to the extract_quotelike() interface. --Chris
Download (untitled) / with headers
text/plain 150b
I’m closing this ticket, as it has been reported at <>, and CPAN is upstream for Text::Balanced.

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

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at