Front page | perl.perl5.porters |
Postings from May 2016
[perl #128213] No deprecation warning on literal left curly bracketin /.{/ etc
Thread Previous
From:
Tom Wyant
Date:
May 22, 2016 20:15
Subject:
[perl #128213] No deprecation warning on literal left curly bracketin /.{/ etc
Message ID:
rt-4.0.18-19043-1463948095-1891.128213-75-0@perl.org
# New Ticket Created by Tom Wyant
# Please include the string: [perl #128213]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=128213 >
This is a bug report for perl from wyant@cpan.org,
generated with the help of perlbug 1.40 running under perl 5.24.0.
-----------------------------------------------------------------
[Please describe your issue here]
As I understand it, literal left curly brackets in regular expressions
were deprecated in Perl 5.22, and with Perl 5.25.1 they produced a
compile error. However, it appears that there is no warning (under
5.24.0) or error (under 5.25.1) for the following:
/.{/
/[x]{/
/[xy]{/
/\p{Latin}{/
Compilation of these under 'use re debug' appears to show that the
curlys are compiled as literals. Examples of this are appended. I note
that /x(?:{)/ also produces no warning/exception, but I understand this
to be an instance of the exception for leading curlys.
Is all this a misunderstanding of the deprecation on my part? Or an
obscure code path missed in the deprecation? If the former, please
accept my apologies for wasting your time. And in either case, thank you
very much for making Perl what it is today.
Appended example:
$ perl -c -Mre=debug -e '/.{/'
Compiling REx ".{"
Final program:
1: REG_ANY (2)
2: EXACT <{> (4)
4: END (0)
anchored "{" at 1 (checking anchored) minlen 2
-e syntax OK
Freeing REx: ".{"
$ # but
$ perl -c -Mre=debug -e '/x{/'
Compiling REx "x{"
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/x{ <-- HERE / at -e line 1.
Final program:
1: EXACT <x{> (3)
3: END (0)
anchored "x{" at 0 (checking anchored isall) minlen 2
-e syntax OK
Freeing REx: "x{"
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.24.0:
Configured by tom at Mon May 9 16:46:19 EDT 2016.
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:
Platform:
osname=darwin, osvers=15.4.0, archname=darwin-2level
uname='darwin samwise.local 15.4.0 darwin kernel version 15.4.0: fri feb 26 22:08:05 pst 2016; root:xnu-3248.40.184~3release_x86_64 x86_64 '
config_args='-Dprefix=/trw/local/perl/5.24.0 -Dcf_email=wyant@cpan.org -d'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.11 -fno-strict-aliasing -pipe -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.11 -fno-strict-aliasing -pipe -fstack-protector-strong -I/opt/local/include'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -mmacosx-version-min=10.11 -fstack-protector-strong -L/opt/local/lib'
libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /usr/lib /opt/local/lib
libs=-lpthread -lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-lpthread -ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -mmacosx-version-min=10.11 -bundle -undefined dynamic_lookup -L/opt/local/lib -fstack-protector-strong'
---
@INC for perl 5.24.0:
/trw/local/perl/5.24.0/lib/site_perl/5.24.0/darwin-2level
/trw/local/perl/5.24.0/lib/site_perl/5.24.0
/trw/local/perl/5.24.0/lib/5.24.0/darwin-2level
/trw/local/perl/5.24.0/lib/5.24.0
.
---
Environment for perl 5.24.0:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/tom
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/trw/local/perl/5.24.0/bin:/trw/local/lynx/2.8.8-with-ssl/bin:/trw/local/perl6/2015.12/bin:/trw/local/perl6/2015.12/share/perl6/site/bin:/trw/local/simh/3.9-0/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/tom/Code/Tools
PERLPKGOPT=-noppm
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Previous