[jifty-devel] Filehandles in actions
jpollack at gmail.com
jpollack at gmail.com
Wed Mar 7 15:59:54 EST 2007
Ah, I had just gotten to CGI.pm in my effort to backtrack where the
data came from. :)
On 3/7/07, Alex Vandiver <alexmv at bestpractical.com> wrote:
> It's a kludge created by CGI.pm. A possibly useful thing we should do
> in Jifty is turn it into an IO::Handle using:
>
> my $h = IO::Handle->new;
> $h->fdopen(fileno($$fh), "r");
This works! I had gotten close, thinking to try
IO::Handle->new->fdopen ($fh, "r"), but hadn't thought to try tossing
in an extra dereference and fileno. Thanks a bunch!!
Yeah, IMHO, it's a bug that Jifty currently doesn't do this. 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.
Thanks again,
Joshua
More information about the jifty-devel
mailing list