Subject: | Close Function doesn't close properly |
it seems the close function doesn't properly close the file,
I had troubles when creating a rtf file then using MIME::Lite to send it
via email. the attached file was unabled to be opened.
I figured out that it wasn't closing properly, here is the fix I used to
close it:
sub RTF::Writer::close {
return unless $_[0][2];
$_[0]->print(\$_[0][1]) if length $_[0][1];
$_[0][2]->close();
undef $_[0][2];
$_[0][1] = '';
return;
}
hopes this helps