Front page | perl.perl5.porters |
Postings from April 2014
[perl #121700] Ambiguous use of -foo when it isn't ambiguous
Thread Next
From:
Eric Brine
Date:
April 22, 2014 13:41
Subject:
[perl #121700] Ambiguous use of -foo when it isn't ambiguous
Message ID:
rt-4.0.18-1567-1398174104-419.121700-75-0@perl.org
# New Ticket Created by "Eric Brine"
# Please include the string: [perl #121700]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=121700 >
This is a bug report for perl from ikegami@adaelis.com,
generated with the help of perlbug 1.39 running under perl 5.18.0.
-----------------------------------------------------------------
[Please describe your issue here]
$ perl -Mstrict -wE'sub foo { 123 } say -foo;'
Ambiguous use of -foo resolved as -&foo() at -e line 1.
-123
A TERM can't follow a TERM, so the "-" must be a subtraction operator, not the start of a -BAREWORD string literal.
(Bug report submitted using 5.18.0, but the bug is present in blead.)
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl 5.18.0:
Configured by ikegami at Sat Jun 1 13:07:24 PDT 2013.
Summary of my perl5 (revision 5 version 18 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.32.45-grsec-2.2.2-r3, archname=x86_64-linux-thread-multi
uname='linux twins 2.6.32.45-grsec-2.2.2-r3 #8 smp mon oct 10 13:33:17 pdt 2011 x86_64 gnulinux '
config_args='-de -Dprefix=/home/ikegami/usr/perlbrew/perls/5.18.0t -DPERL_SUB_DEPTH_WARN=1000 -Dusethreads -Aeval:scriptdir=/home/ikegami/usr/perlbrew/perls/5.18.0t/bin'
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=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.4.5', 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='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib /lib64 /usr/lib64
libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.11.3.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.11.3'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'
Locally applied patches:
---
@INC for perl 5.18.0:
/home/ikegami/usr/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/x86_64-linux-thread-multi
/home/ikegami/usr/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0
/home/ikegami/usr/perlbrew/perls/5.18.0t/lib/5.18.0/x86_64-linux-thread-multi
/home/ikegami/usr/perlbrew/perls/5.18.0t/lib/5.18.0
.
---
Environment for perl 5.18.0:
HOME=/home/ikegami
LANG=en_US.UTF-8
LANGUAGE (unset)
LC_COLLATE=C
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/ikegami/usr/perlbrew/bin:/home/ikegami/usr/perlbrew/perls/5.18.0t/bin:.:/home/ikegami/bin:/home/ikegami/.gems/bin:/usr/lib/ruby/gems/1.8/bin/:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
PERLBREW_BASHRC_VERSION=0.67
PERLBREW_HOME=/home/ikegami/.perlbrew
PERLBREW_MANPATH=/home/ikegami/usr/perlbrew/perls/5.18.0t/man
PERLBREW_PATH=/home/ikegami/usr/perlbrew/bin:/home/ikegami/usr/perlbrew/perls/5.18.0t/bin
PERLBREW_PERL=5.18.0t
PERLBREW_ROOT=/home/ikegami/usr/perlbrew
PERLBREW_VERSION=0.67
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #121700] Ambiguous use of -foo when it isn't ambiguous
by Eric Brine