B
bernd
Hi,
Has anyone experience with dying from CGI::Carp with a status?
Using LWP one can catch status with:
$response = $ua->request($req);
$content = $response->content;
if ($response->is_success) {
print $content;
} else {
print $response->status_line;
}
However, when the script "dies" with CGI::Carp the exit status is "200
OK".
I'd rather have a status that is not "OK" and not scan the returned
$content for "Software error".
Has someone been able to do this?
Bernd
Has anyone experience with dying from CGI::Carp with a status?
Using LWP one can catch status with:
$response = $ua->request($req);
$content = $response->content;
if ($response->is_success) {
print $content;
} else {
print $response->status_line;
}
However, when the script "dies" with CGI::Carp the exit status is "200
OK".
I'd rather have a status that is not "OK" and not scan the returned
$content for "Software error".
Has someone been able to do this?
Bernd