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

Syntax error on use without semicolon #846

Closed
p5pRT opened this issue Nov 12, 1999 · 2 comments
Closed

Syntax error on use without semicolon #846

p5pRT opened this issue Nov 12, 1999 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented Nov 12, 1999

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

Searchable as RT1774$

@p5pRT
Copy link
Author

p5pRT commented Nov 12, 1999

From mjtg@cus.cam.ac.uk

compiles without error. But omitting the apparently redundant
second semicolon gives

% perl -w
{ package DB; use vars '$single'
}
syntax error at /home/mjtg/perl5.005_03/lib/vars.pm line 1, near "package vars"
BEGIN failed--compilation aborted at - line 2.

Happens on all versions of perl up to 5.005_62.

Presumably some lexer state is leaking between the main program and
vars.pm .

Mike Guy

% perl -V
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  Platform​:
  osname=sunos, osvers=4.1.3, archname=sun4-sunos
  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 -DREG_INFTY=22790'
  ccflags ='-I/usr/local/include -DREG_INFTY=22790'
  stdchar='unsigned char', d_stdstdio=define, usevfork=true
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='ld', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib /usr/ucblib
  libs=-ldbm -ldl -lm -lc -lposix
  libc=/lib/libc.so.1.8, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-fpic', lddlflags='-assert nodefinitions -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Locally applied patches​:
  pos.list
  IO.file.return
  int.delimiter
  bigfloat
  Built under sunos
  Compiled at Jul 7 1999 16​:09​:54
  @​INC​:
  /home/mjtg/perl5.005_03/lib
  /home/mjtg/perl5.005_03/lib
  /home/mjtg/perl5.005_03/lib
  .

@p5pRT
Copy link
Author

p5pRT commented Jul 15, 2000

From @vanstyn

Mike Guy once wrote​:
:% perl -w
:{ package DB; use vars '$single';
:}
:
:compiles without error. But omitting the apparently redundant
:second semicolon gives
:
:% perl -w
:{ package DB; use vars '$single'
:}
:syntax error at /home/mjtg/perl5.005_03/lib/vars.pm line 1, near "package vars"
:BEGIN failed--compilation aborted at - line 2.
:
:Happens on all versions of perl up to 5.005_62.

Just for the record (mainly the bugdb), this is fixed in 5.6.0.

Hugo

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