Re: LWP error: "...not exported by the Socket module"
Martin Baulig (baulig@castor.uni-trier.de)
Mon, 26 Jan 1998 12:28:06 +0100 (CET)
-----BEGIN PGP SIGNED MESSAGE-----
Hi,
a checked this with my version of perl and found that this is NOT a
problem with LWP. But something seems to be wrong with your perl.
Tried a
* * *
# perl -MDevel::Peek -M'Socket qw(pack_sockaddr_in);' -e'Dump pack_sockaddr_in("8080","127.0.0.1")'
SV = PV(0x80b6784)
REFCNT = 1
FLAGS = (TEMP,POK,pPOK)
PV = 0x80bfbc0 "a"
CUR = 16
LEN = 17
* * *
It should at least work (if you don't have Devel::Peek) with:
# perl -M'Socket qw(pack_sockaddr_in);'
If you get the '... not exported ...' message, look at
# less `perl -MConfig -e'print $Config{installarchlib}'`/Socket.pm
below the =cut, you'll find:
* * *
use Carp;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw(
inet_aton inet_ntoa pack_sockaddr_in unpack_sockaddr_in
pack_sockaddr_un unpack_sockaddr_un
sockaddr_in sockaddr_un
INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_NONE
....
* * *
If 'pack_sockaddr_in' is missing in the export list, then something is
wrong with your perl. Get the most recent version of perl to fix this
problem.
If it's in the export list and all the tests above work (this should NEVER
happen), than we really have a problem (well, never say never ...).
Martin
On Thu, 22 Jan 1998, Leo Ramos wrote:
> Date: Thu, 22 Jan 1998 10:05:56 -0800 (PST)
> From: Leo Ramos <leo@netgate.net>
> To: libwww-perl@ics.uci.edu
> Cc: leo@netgate.net
> Subject: LWP error: "...not exported by the Socket module"
>
> Hi,
>
> I've had this error now on two different machines. If
> someone would care to enlighten me on its cause, that
> would be a big help.
>
> I have written a script using perl 5.004_0x and LWP 5.18 on
> Solaris. First I was using a Solaris 2.5.1 machine, now on
> a Solaris 2.6 machine. Same problem occurred: the
> script ran OK for awhile, then suddenly no longer would
> run, giving an error message. No changes were made to perl
> or LWP which might have caused the script to fail.
>
> The script basically checks a number of web pages on the
> internet, and sends back a report based on the contents of
> those pages. Kind of like a content-checking robot.
>
> Here are the messages:
> "pack_sockaddr_in" is not exported by the Socket module at
> /my/path/lib/perl5/site_perl/LWP/Socket.pm line 43
> "unpack_sockaddr_in" is not exported by the Socket module at
> /my/path/lib/perl5/site_perl/LWP/Socket.pm line 43
> "INADDR_ANY" is not exported by the Socket module at ....
> "inet_ntoa" is not exported by the Socket module at ....
> "inet_aton" is not exported by the Socket module at ....
>
> all referencing LWP/Socket.pm line 43
>
> What puzzles me is not only why there is an error, but
> mainly why it did not show up at all, and the script
> ran successfully many times, but now suddenly the
> error does show up every time.
>
> Again, this has happened on 2 different machines in
> the same way (though on the first machine the script
> succeeded more times than on the 2nd machine before
> failing).
>
> -Puzzled, and grateful for any insights.
>
> Leo
>
> L E O R A M O S
> 650 964 5569 * leo@netgate.net
>
>
>
>
- -----------------------------------------------------------------
Martin Baulig - Angewandte Mathematik - Universitaet Trier
baulig@castor.uni-trier.de, http://www.home-of-linux.com/
Key: 1024-bit key with ID C8178435 created 1997/01/24
ID: 67 C1 84 A0 47 F5 11 C5 5F 68 4C 84 99 05 C3 92
Finger me for public key or fetch finger.txt from the url above
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQCVAwUBNMxzSYA8K7jIF4Q1AQF/oQQAnQqWJjB/peCXoox4ISkl607wClIQVutS
QCj8Sz3Oaz9FEFyGB+X64vlqTApAlAsUXrvVHZP17iLsrPRg8Ojfk7TaA8eEz1i+
pMCnyqMquKXOfFTdVdg284w9eQ8fbwHhiW+7wyoHfpIlGWrq+3AQEe3q/jM5l1xq
FgH69lvngY0=
=5Zc1
-----END PGP SIGNATURE-----