install patch?

Matej Kovacic matej.kovacic at uni-lj.si
Wed Apr 11 09:46:27 CEST 2001


Ziv!

> Napako lahko ulovis tako, da das tisti del kode v eval.
Hmm... primer? Plizzz... ;-))

Sicer sem pa dobil odgovor glede mojega programcka - kaj bi lahko bilo
narobe. Treba je instalirati en patch - pa ga ne znam. Mi lahko kdo pomaga?

Pisem en programcic v Perlu in semnaletel na problem... vprašal na eno
mailing listo in od avtorja knjiznice LWP dobil odgovor:

> my $parser = HTML::LinkExtor->new(undef, $main::base_url);
> $parser->parse(get($main::base_url))->eof;

The error probably shows up because get() returns nothing instead of
undef. I think the following patch should fix the problem:

Index: lib/LWP/Simple.pm
===================================================================
RCS file: /cvsroot/libwww-perl/lwp5/lib/LWP/Simple.pm,v
retrieving revision 1.33
diff -u -p -u -r1.33 Simple.pm
--- lib/LWP/Simple.pm 2000/05/24 09:40:43 1.33
+++ lib/LWP/Simple.pm 2001/04/10 17:12:27
@@ -298,7 +298,7 @@ sub _trivial_http_get
my $sock = IO::Socket::INET->new(PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
- Timeout => 60) || return;
+ Timeout => 60) || return undef;
$sock->autoflush;
my $netloc = $host;
$netloc .= ":$port" if $port != 80;

Regards,
Gisle


===
TOREJ: kako instalirati ta patch?


lp, M.




More information about the lugos-prog mailing list