| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-library Mailing List Archives
Problem if the supported data for CURLOPT_URL goes out of scope (perl bindings)
From: Erik Wasser <erik.wasser_at_iquer.net>
Date: Thu, 23 Nov 2006 10:31:30 +0100
Hello list curl-library_at_cool.haxx.se,
I posted this on the curl-users some days ago but Daniel pushed me to
I've a problem with the perl binding and I would like to hear other
It seems that the perl binding got a problem if the supported URL for
Here's a small example (complete example below):
my $curl = WWW::Curl::Easy->new();
{
The error message looks like if it contains some garbage of the
The script below will give you a complete sample script to execute. Just
The expected behavior was that the program runs fine because perl
How other C libraries deal with this?
Any comments about this?
#!/usr/bin/perl -w
use strict;
use constant BUG => 1;
use WWW::Curl::Easy;
my $curl = WWW::Curl::Easy->new();
my $body = "";
$curl->setopt(CURLOPT_WRITEFUNCTION, sub {
$body .= $chunk;
return length($chunk);
# This scope is needed. Without it the program
if (BUG)
$curl->perform() && die $curl->errbuf();
printf "OK, %d bytes fetched\n", length($body);
-- So long... FuzzReceived on 2006-11-23 These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info