Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: undefined value as filehandle from Curl.pm

by wanderedinn (Sexton)
on Jun 28, 2016 at 14:58 UTC ( [id://1166786]=note: print w/replies, xml ) Need Help??


in reply to Re: undefined value as filehandle from Curl.pm
in thread undefined value as filehandle from Curl.pm

The open() you refer to is not in my code, it's in the perl module. I agree the success/failure of the open() should be tested.

Replies are listed 'Best First'.
Re^3: undefined value as filehandle from Curl.pm
by wanderedinn (Sexton) on Jun 29, 2016 at 14:20 UTC

    So, here is an oddity. If I remove the following line:

    $lwpcurl->{agent}->setopt( CURLOPT_HEADERDATA, ['Content-Type:text/xml +'] );

    The error:

    Can't use an undefined value as filehandle reference at /home/mware/httppost/lib/perl5/site_perl/5.8.8/LWP/Curl.pm line 236.

    Goes away.

    Although, the http post still does not work properly. I'm not seeing my test file on the server. I have a curl command line test that works correctly, but can not seem to configure the perl code to do the same.

      I have determined why this error was caused in this code. That is because the parameter I am attempting to use, expects a pointer to a file, file handle, rather than a string as I was attempting. Hence the reason for the filehandle error. Thought I'd post an update for others who might attempt to use this module.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1166786]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 04:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found