develooper Front page | perl.perl5.porters | Postings from January 2009

[perl #62056] Variable expansion in same regex as \N{} escape results in compilation error.

Thread Next
From:
Elliot Shank
Date:
January 8, 2009 01:01
Subject:
[perl #62056] Variable expansion in same regex as \N{} escape results in compilation error.
Message ID:
rt-3.6.HEAD-28035-1231385791-497.62056-75-0@perl.org
# New Ticket Created by  Elliot Shank 
# Please include the string:  [perl #62056]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=62056 >


This is a bug report for perl from perl@galumph.com,
generated with the help of perlbug 1.36 running under perl 5.10.0.


-----------------------------------------------------------------
[Please enter your report here]

Putting a variable expansion into a regex with a \N{} escape
results in a compilation error in 5.10.0.  For example, the
following program compiles:

    #!/usr/bin/env perl
    use charnames ':full';
    m/\N{START OF HEADING}/

However, this

    #!/usr/bin/env perl
    use charnames ':full';
    m/$x\N{START OF HEADING}/

results in

    Constant(\N{START OF HEADING}) unknown: (possibly a missing
    "use charnames ...") in regex;


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=medium
---
Site configuration information for perl 5.10.0:

Configured by elliot at Sun Sep 14 15:07:20 CDT 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=darwin, osvers=9.4.0, archname=darwin-thread-multi-64int-ld-2level
    uname='darwin quaquaversal.local 9.4.0 darwin kernel version 9.4.0: mon jun 9 19:30:53 pdt 2008; root:xnu-1228.5.20~1release_i386 i386 '
    config_args='-Duse64bitint -Dusethreads -Dinc_version_list=none -Dprefix=/Users/elliot/opt/perl/perl-5.10.0-64bit-threads'
    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=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include',
    optimize='-O3',
    cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.5 cc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib'

Locally applied patches:
    

---
@INC for perl 5.10.0:
    /Users/elliot/opt/perl/perl-5.10.0-64bit-threads/lib/5.10.0/darwin-thread-multi-64int-ld-2level
    /Users/elliot/opt/perl/perl-5.10.0-64bit-threads/lib/5.10.0
    /Users/elliot/opt/perl/perl-5.10.0-64bit-threads/lib/site_perl/5.10.0/darwin-thread-multi-64int-ld-2level
    /Users/elliot/opt/perl/perl-5.10.0-64bit-threads/lib/site_perl/5.10.0
    .

---
Environment for perl 5.10.0:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/elliot
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/elliot/bin:/Users/elliot/opt/bin:/Users/elliot/opt/perl/perl-5.10.0-64bit-threads/bin:/opt/local/bin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/X11/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About