cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl Perl Interface

From: Cris Bailiff <c.bailiff_at_awayweb.com>
Date: Sat, 16 Feb 2002 11:53:02 +1100

Hi Paul,
        sorry, I hadn't seen your mail directly to me - it was auto-sorted in to my curl
folder, which I only check every day or two.

> I'm currently trying to rewrite one of my perl scripts that currently
> uses direct calls the the curl binary to use libcurl perl interface. I
> I currently have libcurl 7.9.4 installed and Curl-easy-1.1.9.
>
> I want to be able to do a curl call and capture the header,body and STDERR
> seperately. Using a callback for the header/body works great - but it looks
> like the only way to get stderr is via a file. However the following causes
> a segmentation fault:
>
> Curl::easy::setopt($curl, CURLOPT_STDERR, *ERROR);

I think CURLOPT_STDERR may be new - I don't remember seeing it before. Dealing
with new file handles through perl requires specific tests in the XS code, so
I'll slate this for 1.1.10 (or is that 1.2).

> I notice in the Change log that this perl module is meant to be used with curl
> 7.9.2 - but it mentions removing easy.xs and curlopt-constants.c. Do you mean
> easy.pm as removed the xs file breaks things?

Yes, I meant easy.pm, sorry. I'll fix the docs.

> Removing the easy.pm seems to work as it gets regenerated but the
> curlopt-constants.c seems corrupt as make gives:
>
> curlopt-constants.c:75: unterminated `#ifdef' conditional
>
> Please find example attached.

I haven't had that error, though I did get some strangeness on my mandrake box
that has curl-7.8 as a system RPM as well as my 7.9.4 test install. I'll go
through this again on a clean box and see what might be the problem (along with
the ERRBUFFER issue you raised with me...)

Cris

P.S. I moved this thread to the curl library list - it's not relevant to curl
command line users.

Received on 2002-02-16