develooper Front page | perl.perl5.porters | Postings from May 2016

[perl #128213] No deprecation warning on literal left curly bracketin /.{/ etc

Thread Previous
Tom Wyant
May 22, 2016 20:15
[perl #128213] No deprecation warning on literal left curly bracketin /.{/ etc
Message ID:
# New Ticket Created by  Tom Wyant 
# Please include the string:  [perl #128213]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
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:


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]
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:
    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 -d'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    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',
    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/ /Applications/ /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
  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:

Environment for perl 5.24.0:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About