Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map's {} block can't parse list starting with literal #1047

Closed
p5pRT opened this issue Jan 18, 2000 · 2 comments
Closed

map's {} block can't parse list starting with literal #1047

p5pRT opened this issue Jan 18, 2000 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 18, 2000

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

Searchable as RT1998$

@p5pRT
Copy link
Author

p5pRT commented Jan 18, 2000

From sburke@stonehenge.netadventure.net

2 and 3, below, should be interchangeable, but only 3 is parseable​:

[1 is just from perldoc -f map]
1​: perl -ce '%hash = map { foo($_), $_ } @​array;'
-e syntax OK

2​: perl -ce '%hash = map { "foo", $_ } @​array;'
syntax error at -e line 1, near "} @​array"
-e had compilation errors.

3​: perl -ce '%hash = map { ("foo", $_) } @​array;'
-e syntax OK

4​: perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  Platform​:
  osname=aix, osvers=4.3.1.0, archname=aix
  uname='aix pegasus 3 4 000165185700 '
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  Compiler​:
  cc='cc', optimize='-O', gccversion=
  cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include'
  ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include'
  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=8
  alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries​:
  ld='ld', ldflags ='-L/usr/local/lib -L/usr/local/gnu/lib -L/usr/ccs/lib -L/lib'
  libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib /usr/local/gnu/lib
  libs=-lnsl -lgdbm -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
  libc=, so=a, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE​:perl.exp'
  cccdlflags=' ', lddlflags='-bhalt​:4 -bM​:SRE -bI​:$(PERL_INC)/perl.exp -bE​:$(BASEEXT).exp -b '

Characteristics of this binary (from libperl)​:
  Built under aix
  Compiled at Aug 12 1999 09​:10​:29
  %ENV​:
  PERLLIB="/nfs/user/l/lachler/.bin/perl"
  @​INC​:
  /nfs/user/l/lachler/.bin/perl
  /usr/local/gnu/lib/perl5/5.00503/aix
  /usr/local/gnu/lib/perl5/5.00503
  /usr/local/gnu/lib/perl5/site_perl/5.005/aix
  /usr/local/gnu/lib/perl5/site_perl/5.005
  .

--
Sean M. Burke sburke@​netadventure.net http​://www.netadventure.net/~sburke/

@p5pRT
Copy link
Author

p5pRT commented Jan 18, 2000

From @tamias

On Tue, Jan 18, 2000 at 03​:51​:18PM -0800, Sean M. Burke wrote​:

Contents of a map's {} block are being misparsed when (at least) first
item is a literal.

This duplicates an earlier bug report. Please refer to
<http​://bugs.perl.org/pbdb.cgi?req=tidmids&tidmids=19991201.001> for the
earlier report and followup discussion.

Ronald

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant