develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #100962] Socket and Socket6 autoload warnings

root @ grommet . slackware . lan
October 10, 2011 03:27
[perl #100962] Socket and Socket6 autoload warnings
Message ID:
# New Ticket Created by  root@grommet.slackware.lan 
# Please include the string:  [perl #100962]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from root@grommet.slackware.lan,
generated with the help of perlbug 1.33 running under perl v5.6.1.

[Please enter your report here]

under certain conditions, constants loaded from Socket and Socket6 do not
behave as expected. Specifically they gobble the contents of @_ and cause
the autoload routine in the respective module to emit a warning that is 

Example from Socket6 -- easily duplicated in Socket

Argument "stuff" isn't numeric in subroutine entry at
        /usr/lib/perl5/site_perl/i386-linux/ line 293 (#1)
    (W numeric) The indicated string was fed as an argument to an operator
    that expected a numeric value instead.  If you're fortunate the message
    will identify which operator was so unfortunate.

AF_INET6 => 10

A test program that generates this follows:


use diagnostics;
use Socket6 qw(AF_INET6);
@_ = 'stuff';
my $af = &AF_INET6;
print "AF_INET6 => $af\n";

module Socket behaves in the same manner.


use diagnostics;
use Socket;
@_ = 'stuff';
my $af = &AF_INET;
print "AF_INET => $af\n";

Exported "symbols" should behave in a consistent manner and
not generate global warnings that are dependent on the calling context.

[Please do not change anything below this line]
Site configuration information for perl v5.6.1:

Configured by root at Wed Apr 11 22:55:30 PDT 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
    osname=linux, osvers=2.4.2, archname=i386-linux
    uname='linux grommet 2.4.2 #1 smp sun feb 25 16:33:33 pst 2001 i686 unknown '
    config_args='-de -Dprefix=/usr -Darchname=i386-linux -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dsitelib=/usr/lib/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl/i386-linux'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/, 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'

Locally applied patches:

@INC for perl v5.6.1:

Environment for perl v5.6.1:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About