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

[ID 20000405.016] Newline not allowed between bareword and =>

From:
M.J.T. Guy
Date:
April 5, 2000 08:50
Subject:
[ID 20000405.016] Newline not allowed between bareword and =>
Message ID:
E12cs4Y-0001cz-00@ursa.cus.cam.ac.uk
I'm sure I've seen this reported before, but I couldn't find it in the
archive.

A bareword doesn't get autoquoted before => if there's a newline in
between:

    % perl5.6.0 -w
    use strict;
    my $a = { a
    => 1 };
    __END__
    Bareword "a" not allowed while "strict subs" in use at - line 2.
    Execution of - aborted due to compilation errors.


Mike Guy

% perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname=''
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=2.7.2.3
    cppflags='-I/usr/local/include -I/opt/local/include -DREG_INFTY=22786'
    ccflags ='-I/usr/local/include -I/opt/local/include -DREG_INFTY=22786'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fpic', lddlflags='-G -L/usr/local/lib -L/opt/local/lib'


Characteristics of this binary (from libperl): 
  Locally applied patches:
  	debug.list.file
  	kill.0
  	list.assign
  	perlfaq8.typo
  Built under solaris
  Compiled at Oct 13 1999 04:22:25
  @INC:
    /home/mjtg/perl5.005_03/lib
    /home/mjtg/perl5.005_03/lib
    /home/mjtg/perl5.005_03/lib
    .



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