Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text::Balanced confused by /= vs m// without the m #11429

Closed
p5pRT opened this issue Jun 8, 2011 · 5 comments
Closed

Text::Balanced confused by /= vs m// without the m #11429

p5pRT opened this issue Jun 8, 2011 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 8, 2011

Migrated from rt.perl.org#92438 (status was 'rejected')

Searchable as RT92438$

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2011

From chm@cpan.org

Created by chm@cpan.org

This is a bug report for perl from chm@​cpan.org,
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​:

$ cat badfilter.pm
package badfilter;

use Filter​::Simple;

FILTER_ONLY
code_no_comments =>
# all =>
sub {
s/(\w+)​:\$/$1,\$/;
};

1;

$ cat bisect.pm
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

Perl Info

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)


@p5pRT
Copy link
Author

p5pRT commented Jun 14, 2011

From devel.chm.01@gmail.com

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

@p5pRT
Copy link
Author

p5pRT commented Jun 14, 2011

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2011

From @cpansprout

I’m closing this ticket, as it has been reported at
<https://rt.cpan.org/Public/Bug/Display.html?id=5722>, and CPAN is
upstream for Text​::Balanced.

@p5pRT
Copy link
Author

p5pRT commented Sep 12, 2011

@cpansprout - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant