Bucker wrote:
>
> I apologize for posting this in two groups...this one looks more
> active than the other perl.lang.misc.

Then you should first post to the list you prefer, and then to others, one at a
time, if you don't receive an adequate solution.

> I developed a simple perl script which sets up a curl call with the
> following callback
> 
> 
> $curl->setopt(CURLOPT_WRITEFUNCTION,\&ret_data2);

You must say which module you are using. I think it may be WWW::Curl, but it
would be wrong of me to guess.

> this follows several lines after the all in a seperate sub
>
> sub ret_data2 {
> }
> 
> 
> The above works fine when its not in a package.
> 
> If I put the same code in a package the curl->errbuf returns 0 which
> is good but it never calls the ret_data2 sub.
> 
> Inside a package do I need to reference the WRITEFUNCTION sub
> differently?

It is impossible to say without seeing much more of your code. Why have you put
the WRITEFUNCTION callback in a separate package? And do you understand the
differences between packages and modules?

I could suggest a quick fix based on what I think you have probably done. But I
couldn't live with the resulting program so I won't say :)

Please just show us your code and tell us about the package.

Thank you,

Rob

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to