Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.84k stars 524 forks source link

interpolation of undef var gives wrong warning #1106

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#2061 (status was 'resolved')

Searchable as RT2061$

p5pRT commented 24 years ago

From @ysth

Created by @ysth

Using an undefined variable in a double-quotish string gives the wrong warning message​:

[D​:\]perl -we "$a=qq(x$a)" Use of uninitialized value in concatenation (.) at -e line 1.

Perl Info ``` Site configuration information for perl 5.00563: Configured by sthoenna at Fri Dec 24 00:24:20 PST 1999. Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration: Platform: osname=os2, osvers=2.30, archname=os2 uname='os2 localhost 2 2.30 i386 ' config_args='-des -D prefix=d:/perl' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef use64bits=undef usemultiplicity=undef Compiler: cc='gcc', optimize='-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -s', gccversion=2.8.1 cppflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -D_EMX_CRT_REV_=62' ccflags ='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -D_EMX_CRT_REV_=62' 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=y, prototype=define Linker and Libraries: ld='gcc', ldflags ='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000' libpth=d:/emx/lib d:/emx/lib/mt libs=-lsocket -lm -lbsd libc=d:/emx/lib/mt/c_import.lib, so=dll, useshrplib=true, libperl=libperl.lib Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-Zdll', lddlflags='-Zdll -Zomf -Zmt -Zcrtdll -s' Locally applied patches: @INC for perl 5.00563: d:/perl/lib/5.00563/os2 d:/perl/lib/5.00563 d:/perl/lib/site_perl/5.00563/os2 d:/perl/lib/site_perl . Environment for perl 5.00563: HOME=d:\os2apps\yarn\home LANG=en_us LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=d:\bin;C:\OS2;d:\perl\bin;C:\OS2\SYSTEM;C:\OS2\INSTALL;C:\;C:\OS2\MDOS;C:\OS2\APPS;C:\MMOS2;d:\os2apps\util;d:\DOSAPPS\UTIL;c:\sio;D:\WINDOWS;d:\pdksh;d:\emx\bin;d:\emacs\19.33\bin;d:\ispell PERL_BADLANG (unset) PERL_SH_DIR=d:\BIN SHELL (unset) ```
p5pRT commented 24 years ago

From @andk

On Mon\, 31 Jan 2000 17​:34​:18 -0800 (PST)\, Allen Ropbert Scott-Thoennes \sthoenna@​efn\.org said​:

This is a bug report for perl from sthoenna@​efn.org\, generated with the help of perlbug 1.27 running under perl 5.00563.

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

Using an undefined variable in a double-quotish string gives the wrong warning message​:

[D​:\]perl -we "$a=qq(x$a)" Use of uninitialized value in concatenation (.) at -e line 1.

For me this doesn't look like a bug. It is about exposing a bit of the implementation\, namely that interpolation is concatenation after all.

-- andreas