develooper Front page | perl.perl5.porters | Postings from March 2000

[ID 20000331.022] package 'vars' not registered for warnings

From:
Piotr Piatkowski
Date:
March 31, 2000 13:03
Subject:
[ID 20000331.022] package 'vars' not registered for warnings
Message ID:
200003312103.XAA27164@kompas.usr.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):

--- 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):

--- 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



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About