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

[BUG our() 5.005_63] our $a; throws an unecessary warning. #1070

Closed
p5pRT opened this issue Jan 23, 2000 · 5 comments
Closed

[BUG our() 5.005_63] our $a; throws an unecessary warning. #1070

p5pRT opened this issue Jan 23, 2000 · 5 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Jan 23, 2000

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

Searchable as RT2022$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 23, 2000

From @schwern

  our $a;

It should be obvious that this is far from useless as its directly
analogous to​:

  my $a;

and (almost) equivalent to​:

  use vars qw($a);

neither of which throw warnings. I suspect this is a holdover from
having​:

  $a;

throw a warning.

--

Michael G Schwern schwern@​pobox.com
  http​://www.pobox.com/~schwern
  /(?​:(?​:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 23, 2000

From @schwern

  our $a;

It should be obvious that this is far from useless as its directly
analogous to​:

  my $a;

and (almost) equivalent to​:

  use vars qw($a);

neither of which throw warnings. I suspect this is a holdover from
having​:

  $a;

throw a warning.

Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration​:
  Platform​:
  osname=linux, osvers=2.2.10, archname=i686-linux
  uname='linux athens 2.2.10 #3 smp mon aug 2 16​:48​:09 edt 1999 i686 unknown '
  config_args=''
  hint=previous, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  use64bits=undef usemultiplicity=undef
  Compiler​:
  cc='cc', optimize='-g', gccversion=2.95.2 19991109 (Debian GNU/Linux)
  cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -DDEBUGGING_OPS -DDEBUGGING_MSTATS'
  ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -DDEBUGGING_OPS -DDEBUGGING_MSTATS'
  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='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
  libc=/lib/libc-2.1.2.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl)​:
  Compile-time options​: DEBUGGING
  Built under linux
  Compiled at Jan 3 2000 05​:17​:35
  @​INC​:
  /usr/local/perl5.005_63/lib/i686-linux
  /usr/local/perl5.005_63/lib
  /usr/local/perl5.005_63/lib/site_perl/i686-linux
  /usr/local/perl5.005_63/lib/site_perl
  .

--

Michael G Schwern schwern@​pobox.com
  http​://www.pobox.com/~schwern
  /(?​:(?​:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jan 23, 2000

From @gsar

On Mon, 24 Jan 2000 00​:02​:19 EST, Michael G Schwern wrote​:

Oddly enough, the following produces a "Useless use of a variable in
void context" warning​:

   our $a;

See archives for change#4800.

Sarathy
gsar@​ActiveState.com

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jul 14, 2003

From @rspier

chromatic say​:
#2022 is fixed in 5.8.0.

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Jul 14, 2003

@rspier - Status changed from 'stalled' to 'resolved'

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