develooper Front page | perl.perl5.porters | Postings from July 2003

Socket bug? FreeBSD 4.8 perl 5.00503

Thread Next
From:
Alex Huppenthal
Date:
July 31, 2003 09:43
Subject:
Socket bug? FreeBSD 4.8 perl 5.00503
Message ID:
1059665227.fba98bd022f47@gwsprings.net


I have a bug:

4.8-STABLE FreeBSD 4.8-STABLE #4: Thu Jul 31 08:44:53 MDT 2003

This is perl, version 5.005_03 built for i386-freebsd

Global symbol "%Config" requires explicit package name 
at /usr/libdata/perl/5.00503/mach/IO/Socket.pm line 211.
BEGIN not safe after errors--compilation aborted 
at /usr/libdata/perl/5.00503/mach/IO/Socket.pm line 377.
BEGIN failed--compilation aborted at /usr/libdata/perl/5.00503/mach/IO.pm line 
33.

Can not seem to find any references to a solution, or the problem on 
google/groups or web. Any help is appreciated. 


The Socket.pm routine is:

sub connect {
    @_ == 2 || @_ == 3 or croak 'usage: $fh->connect(NAME) or $fh->connect
(PORT, ADDR)';
    my $fh = shift;
    my $addr = @_ == 1 ? shift : sockaddr_in(@_);
    my $timeout = ${*$fh}{'io_socket_timeout'};
    local($SIG{ALRM}) = $timeout ? sub { undef $fh; }
                                 : $SIG{ALRM} || 'DEFAULT';

     eval {
        croak 'connect: Bad address'
            if(@_ == 2 && !defined $_[1]);

        if($timeout) {
line 211 >>>            defined $Config{d_alarm} && defined alarm($timeout) or
                $timeout = 0;
        }

        my $ok = connect($fh, $addr);

        alarm(0)
            if($timeout);

        croak "connect: timeout"
            unless defined $fh;

        undef $fh unless $ok;
    };

    $fh;
}


Thread Next


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