[Catalyst] Uniform treatment of all parameters (including file uploads)

Zbigniew Lukasiak zzbbyy at gmail.com
Wed Jul 4 12:29:12 GMT 2007


On 7/3/07, Matt S Trout <dbix-class at trout.me.uk> wrote:
> No, because this would break the ability to pass the request object to
> something expecting the CGI.pm API, and break compat for existing app code.

I think you meant Apache::Request because the current implementation
is not compatible with CGI.pm.

->param( 'file_field' ):
- in CGI returns the filename that is also a filehandle
- in Catalyst it is just filename

->upload( 'uploaded_file_name' )
- in CGI returns a filehandle
- in Catalyst returns Catalyst::Request::Upload

>
> Maybe have a think about what you'd like to see from a completely new
> unified API and propose that?

So my wishlist would be: ->upload to return the filehandle (for
compatibility with CGI), ->param to return Catalyst::Request::Upload,
and make Catalyst::Request::Upload stringify to the filename.  If we
could also make Catalyst::Request::Upload work as a filehandle in
angle brackets it would be entirely compatible with CGI.pm (but not
with Apache::Request).

-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/



More information about the Catalyst mailing list