From: Andy Grundman Date: Wed, 12 Oct 2005 21:20:16 +0000 (+0000) Subject: Added filename to debug output for uploaded files X-Git-Tag: 5.7099_04~1213 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=bc2beef5b251464257ade572b65d58698ae67a01 Added filename to debug output for uploaded files --- diff --git a/Changes b/Changes index e158336..2282bec 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Tis file documents the revision history for Perl extension Catalyst. 5.50 + - Added filename to debug output for uploaded files. + - Fixed forwarding with embedded arguments. - Fixed handling of escaped query strings. - Added upload parameters back into $c->req->params. - Added multiple paths support to dispatcher diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 8103db9..f6d1408 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1027,15 +1027,16 @@ sub prepare_uploads { if ( $c->debug && keys %{ $c->request->uploads } ) { my $t = Text::ASCIITable->new; - $t->setCols( 'Filename', 'Type', 'Size' ); - $t->setColWidth( 'Filename', 37, 1 ); - $t->setColWidth( 'Type', 24, 1 ); + $t->setCols( 'Key', 'Filename', 'Type', 'Size' ); + $t->setColWidth( 'Key', 12, 1 ); + $t->setColWidth( 'Filename', 28, 1 ); + $t->setColWidth( 'Type', 18, 1 ); $t->setColWidth( 'Size', 9, 1 ); $t->alignCol( 'Size', 'left' ); for my $key ( sort keys %{ $c->request->uploads } ) { my $upload = $c->request->uploads->{$key}; for my $u ( ref $upload eq 'ARRAY' ? @{$upload} : ($upload) ) { - $t->addRow( $key, $u->type, $u->size ); + $t->addRow( $key, $u->filename, $u->type, $u->size ); } } $c->log->debug( "File Uploads are:\n" . $t->draw );