How are you doing the temp file creation here? If you use the list context version of tempfile you should just be able to do this:

sub hook_xmlresponse {
 my ($self, $processor) = @_;

 ...
 # for non-xml content...
 ...

 my ($fh, $filename) = tempfile();
 print $fh $data;
 $self->client->headers_in->filename($filename);
 $self->client->notes('to_unlink', $filename);
 return DECLINED;
}

sub hook_response_sent {
 my ($self, $code) = @_;
unlink($self->client->notes('to_unlink')) if $self->client->notes('to_unlink');
 return DECLINED;
}


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to