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

[perl #82854] utf8 whacks Carp in 5.12

From:
Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯
Date:
January 26, 2011 15:03
Subject:
[perl #82854] utf8 whacks Carp in 5.12
Message ID:
rt-3.6.HEAD-16298-1296039166-1414.82854-75-0@perl.org
# New Ticket Created by  Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 
# Please include the string:  [perl #82854]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=82854 >



This is a bug report for perl from daxim@cpan.org,
generated with the help of perlbug 1.39 running under perl 5.12.1.


-----------------------------------------------------------------
[Please describe your issue here]

The behaviour of program "bar" below is different in 5.12 than before.
See <http://perlmonks.org/?node_id=884018> for some discussion.

$ cat foo
#!/usr/bin/env perl5.10.1
use utf8;
use strict;
use CGI::Carp qw(fatalsToBrowser);
$c;


$ ./foo   # ok
Status: 500
Content-type: text/html

<h1>Software error:</h1>
<pre>Global symbol &quot;$c&quot; requires explicit package name at ./foo line 5.
Execution of ./foo aborted due to compilation errors.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message 
and the time and date of the error.

</p>
[Mon Jan 24 xx:xx:xx 2011] foo: Global symbol "$c" requires explicit package name at ./foo line 5.
[Mon Jan 24 xx:xx:xx 2011] foo: Execution of ./foo aborted due to compilation errors.


$ cat bar
#!/usr/bin/env perl5.12.1
use utf8;
use strict;
use CGI::Carp qw(fatalsToBrowser);
$c;


$ ./bar   # nok
BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/5.12.1/Carp.pm line 104.


$ cat quux
#!/usr/bin/env perl5.12.1
# use utf8;
use strict;
use CGI::Carp qw(fatalsToBrowser);
$c;


$ ./quux  # ok
Status: 500
Content-type: text/html

<h1>Software error:</h1>
<pre>Global symbol &quot;$c&quot; requires explicit package name at ./quux line 5.
Execution of ./quux aborted due to compilation errors.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message 
and the time and date of the error.

</p>
[Mon Jan 24 xx:xx:xx 2011] quux: Global symbol "$c" requires explicit package name at ./quux line 5.
[Mon Jan 24 xx:xx:xx 2011] quux: Execution of ./quux aborted due to compilation errors.


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

Configured by daxim at Wed Jul 21 10:30:27 CEST 2010.

Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
  Derived from: b85be81e3471288c8c432533cfaf3713e28157e9
  Platform:
    osname=linux, osvers=2.6.31.12-0.2-default, archname=x86_64-linux-thread-multi-ld
    uname='linux galahad 2.6.31.12-0.2-default #1 smp 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Accflags=-fPIC -DPERL_USE_SAFE_PUTENV -DDEBUGGING -Dcf_email=daxim@cpan.org -Dhtml1dir=/home/daxim/local/share/doc/perl5 -Dhtml3dir=/home/daxim/local/share/doc/perl5 -Dnoextensions=ODBM_File -Dman1dir=/home/daxim/local/share/man/man1 -Dman3dir=/home/daxim/local/share/man/man3 -Dperladmin=daxim@cpan.org -Dprefix=/home/daxim/local -Dusemorebits -Dusethreads -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.1 [gcc-4_4-branch revision 150839]', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
    alignbytes=16, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.10.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.12.1:
    /home/daxim/local/lib/perl5/site_perl/5.12.1/x86_64-linux-thread-multi-ld
    /home/daxim/local/lib/perl5/site_perl/5.12.1
    /home/daxim/local/lib/perl5/5.12.1/x86_64-linux-thread-multi-ld
    /home/daxim/local/lib/perl5/5.12.1
    /home/daxim/local/lib/perl5/site_perl
    .

---
Environment for perl 5.12.1:
    HOME=/home/daxim
    LANG=de_DE.UTF-8
    LANGUAGE=
    LD_LIBRARY_PATH=:/home/daxim/local/share/oracle/lib
    LOGDIR (unset)
    PATH=/home/daxim/perl5/perlbrew/bin:/home/daxim/local/bin:/opt/kde3/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
    PERLBREW_PATH=/home/daxim/perl5/perlbrew/bin
    PERLBREW_ROOT=/home/daxim/perl5/perlbrew
    PERLBREW_VERSION=0.15
    PERL_BADLANG (unset)
    PERL_EXTUTILS_AUTOINSTALL=--default-deps
    SHELL=/bin/bash




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