[html-formfu] HTML::FormFu keeps a filehandle opened?
Octavian Râşniţă
orasnita at gmail.com
Thu Dec 17 16:28:41 GMT 2009
Hi,
I am trying to make some changes in the module
DBIx::Class::InflateColumn::File and I found a problem.
I have a table with records that contain a "file" field, which contains the
name of the file that was uploaded using the HTML::FormFu File element.
When a record is accessed, for the "file" field the DBIx::Class inflator
returns a hash ref with 2 elements: the file handle and the file name.
If I get that record in a standalone application, while the application is
running, or until the file handle gets out of scope, the file handle remains
opened and I can't move or delete the file from the hard disk.
If I use HTML::FormFu for modifying that record, after the values of the
fields are displayed in the editing form, the file handle is also opened,
but it remains opened until I restart the Catalyst app.
(And if I want to delete it using that editing form, I can't do it because I
don't know how to close that file handle first.)
Does anyone know what could I do to not keep that file handle opened?
It seems that when it is accessed in Catalyst with HTML::FormFu it never
gets out of scope.
I created that file handle with Path::Class::File.
Thank you for any idea.
Octavian
More information about the HTML-FormFu
mailing list