[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

[ID 20000125.006] strict.pm not strict enough




This is a bug report for perl from gbacon@ruby.itsc.uah.edu,
generated with the help of perlbug 1.27 running under perl 5.00563.


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

A post on clpmisc today contained something like

    #! /usr/bin/perl -w
    use strict

    $, = ' '; # set output field separator
    $\ = "\n"; # set output record separator

    $foo = 42;

That shouldn't compile, right?  Notice that there's no comma after
C<use strict>.  The code above is equivalent to C<use strict ' '>
which fails to enable any stricture!  It's because of the following
line in &strict::bits:

    foreach my $s (@_){ $bits |= $bitmask{$s} || 0; };

IOW, C<use strict 'foobletch';> is a nop.  I can see how one might
construe this as a backward compatibility feature, but if a programmer
casts a spell of protection, Perl ought to thump back for using false
magic.

This is also the case for 5.00503.

[Please do not change anything below this line]
-----------------------------------------------------------------

---
Site configuration information for perl 5.00563:

Configured by gbacon at Fri Jan 14 19:47:37 CST 2000.

Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration:
  Platform:
    osname=linux, osvers=2.2.5-15, archname=i686-linux
    uname='linux ruby.itsc.uah.edu 2.2.5-15 #1 mon apr 19 23:00:46 edt 1999 i686 unknown '
    config_args='-des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    cppflags='-Dbool=char -DHAS_BOOL -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -fno-strict-aliasing -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/libc-2.1.1.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl 5.00563:
    /usr/local/lib/perl5/5.00563/i686-linux
    /usr/local/lib/perl5/5.00563
    /usr/local/lib/site_perl/5.00563/i686-linux
    /usr/local/lib/site_perl
    .

---
Environment for perl 5.00563:
    HOME=/home/gbacon
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/nmh/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/usr/local/jdk1.2/bin:/home/gbacon/bin
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]