On Saturday 20 September 2003 02:44 pm, Gisle Aas wrote:
> David Sanders <[EMAIL PROTECTED]> writes:
> > I am having a problem with LWP::Simple::get() on a Windows XP
> > installation. (LWP version 5.69).
> > The following command hangs up (requiring a Cntrl-c):
> > perl -e "use LWP::Simple; my \$out=get(\"http://www.cpan.org\";);print
> > \$out"
> >
> > but this works
> > perl -e "use LWP::Simple;getprint(\"http://www.cpan.org\";)"
>
> LWP::Simple::get use a different implementation by default.  You force
> it to use the full LWP by importing $ua variable from LWP::Simple.  The
> getprint() function always use the full LWP.
>
> I don't see a problem here when executing your example code on Windows
> XP.  It would be helpful if you could try to run the hanging code under
> the debugger to figure out what happens.
>
> Regards,
> Gisle
Under the debugger it just hangs also; here is a test case:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>cat test5.pl
#!perl -w
#
use LWP::Simple;
use strict;
use warnings;
use diagnostics;

my @output = get("http://www.sandersweb.net/";);
if (! @output) { die "Cannot get file\n"; }
print @output;

C:\>perl -d test5.pl

Loading DB routines from perl5db.pl version 1.19
Editor support available.

Enter h or `h h' for help, or `perldoc perldebug' for more help.

main::(test5.pl:8):     my @output = get("http://www.sandersweb.net/";);
  DB<1> n
(hangs at this point)
-- 
David
[EMAIL PROTECTED]

Reply via email to