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

package 'vars' not registered for warnings #1682

Closed
p5pRT opened this issue Mar 31, 2000 · 4 comments
Closed

package 'vars' not registered for warnings #1682

p5pRT opened this issue Mar 31, 2000 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 31, 2000

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

Searchable as RT2928$

@p5pRT
Copy link
Author

p5pRT commented Mar 31, 2000

From kompas@kompas.usr.onet.pl

Created by kompas@onet.pl

Trying to declare globals with "vars" pragma, when one make very common
mistake of using comma in qw() qouting, like this​:

perl -le 'use vars qw($aaa, $bbb)'

one will get very cryptic message​:

package 'vars' not registered for warnings at -e line 1
BEGIN failed--compilation aborted at -e line 1.

Actually, this should do nothing special (just remove comma from "$aaa,").

Fixup is very simple (although I'm not sure this is The Right Way, I just
checked warnings man page and checked that this works)​:

Inline Patch
--- vars.pm.old Fri Mar 31 22:57:29 2000
+++ vars.pm     Fri Mar 31 22:57:36 2000
@@ -8,7 +8,7 @@
 # if Carp hasn't been loaded in earlier compile time. :-(
 # We'll let those bugs get found on the development track.
 require Carp if $] < 5.00450;
-use warnings::register();
+use warnings::register;

 sub import {


[Please do not change anything below this line] \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\- Flags​:   category=library   severity=medium \-\-\- Site configuration information for perl v5\.6\.0​:

Configured by oa at Fri Mar 31 08​:52​:06 MET DST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration​:
  Platform​:
  osname=solaris, osvers=2.7, archname=sun4-solaris
  uname='sunos md.onet.pl 5.7 generic_106541-07 sun4u sparc sunw,ultra-enterprise '
  config_args=''
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
  useperlio=undef d_sfio=undef uselargefiles=define
  use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler​:
  cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release)
  cppflags='-fno-strict-aliasing -I/usr/local/include'
  ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  stdchar='char', d_stdstdio=define, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags =' -L/usr/local/lib '
  libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
  libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt -lsec
  libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
  cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches​:
 

---
@​INC for perl v5.6.0​:
  /portal/oa/lib/perl5/5.6.0/sun4-solaris
  /portal/oa/lib/perl5/5.6.0
  /portal/oa/lib/perl5/site_perl/5.6.0/sun4-solaris
  /portal/oa/lib/perl5/site_perl/5.6.0
  /portal/oa/lib/perl5/site_perl
  .

---
Environment for perl v5.6.0​:
  HOME=/portal/oa
  LANG (unset)
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/portal/oa/bin​:/usr/local/bin​:/usr/ccs/bin​:/usr/local/bin​:/usr/ccs/bin​:/bin​:/usr/bin​:/usr/ucb​:/usr/bin/X11​:/usr/local/bin​:/usr/local/bin
  PERL_BADLANG (unset)
  SHELL=/bin/bash
env-end
To​: perlbug@​perl.com
Subject​: package 'vars' not registered for warnings
Reply-To​: kompas@​onet.pl

This is a bug report for perl from kompas@​onet.pl,
generated with the help of perlbug 1.28 running under perl v5.6.0.

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

Trying to declare globals with "vars" pragma, when one make very common
mistake of using comma in qw() qouting, like this​:

perl -le 'use vars qw($aaa, $bbb)'

one will get very cryptic message​:

package 'vars' not registered for warnings at -e line 1
BEGIN failed--compilation aborted at -e line 1.

Actually, this should do nothing special (just remove comma from "$aaa,").

Fixup is very simple (although I'm not sure this is The Right Way, I just
checked warnings man page and checked that this works)​:

Inline Patch
--- vars.pm.old Fri Mar 31 22:57:29 2000
+++ vars.pm     Fri Mar 31 22:57:36 2000
@@ -8,7 +8,7 @@
 # if Carp hasn't been loaded in earlier compile time. :-(
 # We'll let those bugs get found on the development track.
 require Carp if $] < 5.00450;
-use warnings::register();
+use warnings::register;

 sub import {
Perl Info

Flags:
    category=library
    severity=medium

Site configuration information for perl v5.6.0:

Configured by oa at Fri Mar 31 08:52:06 MET DST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos md.onet.pl 5.7 generic_106541-07 sun4u sparc sunw,ultra-enterprise '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O', gccversion=2.95.2 19991024 (release)
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.6.0:
    /portal/oa/lib/perl5/5.6.0/sun4-solaris
    /portal/oa/lib/perl5/5.6.0
    /portal/oa/lib/perl5/site_perl/5.6.0/sun4-solaris
    /portal/oa/lib/perl5/site_perl/5.6.0
    /portal/oa/lib/perl5/site_perl
    .


Environment for perl v5.6.0:
    HOME=/portal/oa
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/portal/oa/bin:/usr/local/bin:/usr/ccs/bin:/usr/local/bin:/usr/ccs/bin:/bin:/usr/bin:/usr/ucb:/usr/bin/X11:/usr/local/bin:/usr/local/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash
env-end


@p5pRT
Copy link
Author

p5pRT commented Dec 7, 2000

From The RT System itself

Confirmed in 5.6.0 -- MJD

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2002

From @floatingatoll

[kompas@​kompas.usr.onet.pl - Fri Mar 31 05​:03​:41 2000]​:

This is a bug report for perl from kompas@​onet.pl,
generated with the help of perlbug 1.28 running under perl v5.6.0.

Trying to declare globals with "vars" pragma, when one make very
common
mistake of using comma in qw() qouting, like this​:

perl -le 'use vars qw($aaa, $bbb)'

one will get very cryptic message​:

package 'vars' not registered for warnings at -e line 1
BEGIN failed--compilation aborted at -e line 1.

As of the 5.8/5.9 development branch, this has been fixed. Thanks for the bug
report :)

- R.

grep warnings​::register **/vars.pm
use warnings​::register;

perl -le 'use vars qw($aaa, $bbb)'
echo $?
0

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2002

@floatingatoll - Status changed from 'open' 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