Couple of points on lwpWin32

Martin RJ Cleaver (martin.cleaver@reuters.com)
Fri, 07 Jun 1996 11:08:46 -0400 (EDT)


Philippe LE BERRE (leberre@matif.fr) said in a mail to me:
>Hi,
>I mailed you days ago about a problem with yours 
>script and libwww. I think i have found out.
>
>I added this : 
>@ISA=(Winsock);
>@EXPORT=@Winsock::EXPORT;
>to the LWP::socket.pm.
>
>And I had my script working. 

Oh right, thanks. Sorry. I didn't realise that you
were saying it didn't work at all, I thought you
were saying that there were warnings. 

According to my override directory (which has the same structure as
the distribution directory but has files with the same names, hence
overriding them) I have overridden Socket.pm, but only to add:

$VERSION=1.3;		# Damned lies.

What should be happening is:
   LWP::Socket   IS-A   ::Socket
&  ::Socket      IS-A   ::WinSock


I'm really busy at the moment but I will get back to looking at this.
Off the top of my head, I can't remember where LWP::Socket gets its
Socket definition from. Mine doesn't have the addition that you
mention but it still works. Can't tell you why right now.

>It still does 
>warnings :
>"Can't locate auto/lwp/socket/autosplit.ix in @INC 
>at c:\progra~1\perl5\lib/autoloader.pm line 73.
>at 
>c:/progra~1/perl5/lib/libwww~1.00/lib/LWP/socket.p
>m line 51"

Yes, I get this and some others as well, which I ought to address:
Use of uninitialized value at 
C:\win32app\dev\perl-extra-libs\standard/LWP/MediaTypes.pm line 49.
Use of uninitialized value at 
C:\win32app\dev\perl-extra-libs\standard/LWP/MediaTypes.pm line 49.

- these are because of $HOME -- Gisle can we please avoid the warning 
if neither $HOME or $LOGDIR are set? 

Subroutine is_info redefined at 
C:\win32app\dev\perl-extra-libs\standard/HTTP/Response.pm line 180.
Subroutine is_success redefined 
at C:\win32app\dev\perl-extra-libs\standard/HTTP/Response.pm line 181.
Subroutine is_redirect redefined 
at C:\win32app\dev\perl-extra-libs\standard/HTTP/Response.pm line 182.
Subroutine is_error redefined 
at C:\win32app\dev\perl-extra-libs\standard/HTTP/Response.pm line 183.

I don't know about these.

>The script that i am running is quite simple :
>use lib "c:/progra~1/perl5/lib/libwww~1.00/lib";
>
>use LWP::UserAgent;
>use URI::Escape;
>
>$ua = new LWP::UserAgent;
>$ua->agent("MySearch/1.0");
>$url ="http://www.matif.fr";
>$request=new HTTP::Request('GET',$url);
>$response=$ua->request($request);
>print $response->content;
>
>It seems that socket.pm need inheritance from 
>winsock, somehow logical. But if you could explain 
>me where these warnings comes from, it would help 
>me.

All I can say at the moment is that the lwpWin32.pl
script invokes AutoSplit on each module. This creates
a shadow directory tree under lib/auto and creates in
this a directory for each module and in these directories
a file for each procedure. The autosplit.ix file allows
the AutoLoader to find out the mapping between filenamez
and procedures and also gives the timestamp of when the 
AutoSplit was performed.

Quite why the autoplit.ix file for the LWP/Socket.pm
I don't know. I haven't had time to look.

>My config : NT 4.0 (Build 1234), Hip's Perl 5.001m 
>build 107, libwww-perl-5.00.

Mine is NT 3.5.1 sp4, HIP 5.001, 107 and 106 

>Thanks.
>
>Philippe Le Berre
>MATIF SA, Paris

Regards,
	Martin

--
Internet Technology Group, Reuters Asia Technical Development (Hong Kong)
Reuters IPTG. - Tel: (IDD) +852 2843 2012   Fax: 2845 7589

Martin.Cleaver@bcs.org.uk (home) Martin.Cleaver@reuters.com (work)
M_CLEAVER@AM@REC (work - internal)

"Argue for your limitations and sure enough they are yours" - Richard Bach.