Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl: How to print WWW::Curl::Form content?

Tags:

curl

perl

I have a my $curlf = WWW::Curl::Form->new; variable, and I'd like to check its content.

I've tried to do a

print Dumper($curlf) if($verbose);

but got the following result:

$VAR1 = bless( do{\(my $o = 151334456)}, 'WWW::Curl::Form' );

What's the correct way to do it?

Thanks in advance.

like image 612
Felipe Arenales Avatar asked Jun 09 '11 20:06

Felipe Arenales


1 Answers

WWW::Curl::Form is not a proper Perl data structure, it is just a scalar reference to a C data structure buried in XS code, which itself is (at least partly) a wrapper around some libcurl library functions.

If you can program in C, the correct way to check its content is to extend the XS code using the right libcurl function calls to extract info from a pair of curl_httppost data structures. Then send a patch to the module's maintainer.

If you can't program in C, then send the module maintainer a feature request for the next version of the module.

like image 60
mob Avatar answered Nov 08 '22 11:11

mob