[jifty-devel] Filehandles in actions

Alex Vandiver alexmv at bestpractical.com
Wed Mar 7 16:08:23 EST 2007

On Wed, 2007-03-07 at 15:59 -0500, jpollack at gmail.com wrote:
> Yeah, IMHO, it's a bug that Jifty currently doesn't do this.

The problem is that you can't get a filename from an IO::Handle object.
I suppose we could implement Jifty::IO::Handle which provides a
->filename method.  Also, for backwards compatability, stringification
would need to return the filename.

>   Also,
> that currently, App::Model::Foo::create gets what appears to be the
> contents of the filehandle instead of the filehandle itself.  This is
> a bug because it prevents create from using information lost in the
> filehandle object, like the original file name.

create shouldn't care if its arguments come from files or from strings.
I think that if you want that custom processing, it should be on the
CreateFoo action, which *does* have access to that information.
 - Alex

More information about the jifty-devel mailing list