develooper Front page | perl.perl5.porters | Postings from April 2010

[perl #74118] $[ assignment not noisy enough

Thread Next
From:
Zefram
Date:
April 8, 2010 04:16
Subject:
[perl #74118] $[ assignment not noisy enough
Message ID:
rt-3.6.HEAD-6227-1270682281-1837.74118-75-0@perl.org
# New Ticket Created by  Zefram 
# Please include the string:  [perl #74118]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74118 >



This is a bug report for perl from zefram@vigo.rous.org,
generated with the help of perlbug 1.39 running under perl 5.11.5.


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

$ perl -lwe '$[=0'
Use of assignment to $[ is deprecated at -e line 1.
$ perl -lwe '($[)=(0)'
$

Assignment to $[ doesn't give the expected deprecation warning if it's
part of a list assignment.

I noticed this in the context of the Perl4-era libraries.  A few of
them explicitly override $[, in the Perl 4 manner, by "local($[) = 0;",
and they surprisingly don't generate a warning thereby.  (None of them
assign anything other than zero to it.)

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.11.5:

Configured by zefram at Sun Feb 21 21:31:04 GMT 2010.

Summary of my perl5 (revision 5 version 11 subversion 5) configuration:
   
  Platform:
    osname=linux, osvers=2.6.26-2-686, archname=i386-linux-thread-multi
    uname='linux vigo.rous.org 2.6.26-2-686 #1 smp wed feb 10 08:59:21 utc 2010 i686 gnulinux '
    config_args='-des -Darchname=i386-linux -Dcccdlflags=-fPIC -Dccdlflags=-rdynamic -Dprefix=/home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52 -Dman1ext=1 -Dman3ext=3perl -Duselargefiles -Dusethreads -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dusedevel -Ui_db'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.3.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.7.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.7'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52/lib/5.11.5/i386-linux-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.11.5:
    /home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52/lib/site_perl/5.11.5/i386-linux-thread-multi
    /home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52/lib/site_perl/5.11.5
    /home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52/lib/5.11.5/i386-linux-thread-multi
    /home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52/lib/5.11.5
    .

---
Environment for perl 5.11.5:
    HOME=/home/zefram
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/zefram/usr/perl/perl_install/perl-5.11.5-i32-f52/bin:/home/zefram/usr/perl/util:/home/zefram/pub/i686-pc-linux-gnu/bin:/home/zefram/pub/common/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/local/bin:/usr/games
    PERL_BADLANG (unset)
    SHELL=/usr/bin/zsh


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