Front page | perl.perl5.porters |
Postings from October 2003
[perl #24157] -MModule=} is broken
Thread Next
From:
Lukas Mai
Date:
October 8, 2003 19:11
Subject:
[perl #24157] -MModule=} is broken
Message ID:
rt-24157-65809.10.9980909617566@rt.perl.org
# New Ticket Created by "Lukas Mai"
# Please include the string: [perl #24157]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24157 >
This is a bug report for perl from lmai@mytum.de,
generated with the help of perlbug 1.34 running under perl v5.8.1.
-----------------------------------------------------------------
[Please enter your report here]
Greetings!
% perl -Mstrict="}" -e1
Unmatched right curly bracket at -e line 0, at end of line
syntax error at -e line 0, near "q{}}"
Execution of -e aborted due to compilation errors.
The following patch fixes the above problem:
% perl-patched -Mstrict="}" -e1
Unknown 'strict' tag(s) '}' at -e line 0
BEGIN failed--compilation aborted.
This may break some JAPHs but I think it's the correct behaviour.
HTH
Lukas Mai
--- perl.c.old Tue Oct 7 21:55:05 2003
+++ perl.c Tue Oct 7 21:58:54 2003
@@ -2648,9 +2648,13 @@ Perl_moreswitches(pTHX_ char *s)
Perl_croak(aTHX_ "Module name required with -%c option",
s[-1]);
sv_catpvn(sv, start, s-start);
- sv_catpv(sv, " split(/,/,q{");
+ sv_catpvn(sv, " split(/,/,q",
+ sizeof " split(/,/,q" /* including trailing '\0' */
+ );
sv_catpv(sv, ++s);
- sv_catpv(sv, "})");
+ sv_catpvn(sv, "\0)",
+ sizeof "\0)" - 1 /* excluding trailing '\0' */
+ );
}
s += strlen(s);
if (!PL_preambleav)
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.1:
Configured by lmai at Tue Oct 7 17:13:22 CEST 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
Platform:
osname=linux, osvers=2.2.18, archname=i686-linux-64int-ld
uname='linux barubary 2.2.18 #1 fri jan 19 22:10:35 gmt 2001 i686 unknown '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3 -fomit-frame-pointer -foptimize-sibling-calls',
cppflags='-fno-strict-aliasing'
ccversion='', gccversion='3.1', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldbm -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
HASHSEED - don't initialize the RNG at startup
MSWITCH - don't use {} as delimiters for the -M switch argument
SAFEARGV - safe 3-argument open in <ARGV>
---
@INC for perl v5.8.1:
/usr/local/lib/perl5/5.8.1/i686-linux-64int-ld
/usr/local/lib/perl5/5.8.1
/usr/local/lib/perl5/site_perl/5.8.1/i686-linux-64int-ld
/usr/local/lib/perl5/site_perl/5.8.1
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux-64int-ld
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl/5.6.1
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.8.1:
HOME=/home/lmai
LANG=en_US
LANGUAGE (unset)
LC_COLLATE=POSIX
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/lmai/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/lib/java/bin:/var/lib/dosemu:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde2/bin:/opt/kde/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #24157] -MModule=} is broken
by Lukas Mai