in reply to File does not exist: 500 read failed
Unsuccessful stat on filename containing newline...
This means that the XML::Simple module is taking your $som variable and assumes that it is a file path because it is invalid XML.
You need to validate the data that receive from the API service. A simple solution would be,
use English qw( -no_match_vars ); my $result; eval { $result = XMLin($som); } if ($EVAL_ERROR) { die "Invalid XML retrieved. The error was " . $EVAL_ERROR . "\n"; }
Also don't refer to internal values for a object ESPECIALLY when it already has an interface!
## GOOD my $som=$response->content; ## BAD!!! my $som=$response->{'_content'};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File does not exist: 500 read failed
by CColin (Scribe) on Dec 07, 2007 at 16:54 UTC | |
by ikegami (Patriarch) on Dec 07, 2007 at 17:14 UTC |