Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For use with Catalyst::Plugin::CheckFileUploadTypes, I needed to provide a fairly long list of acceptable MIME types. This means that my handler code would be e.g.: ```perl sub index_POST: ExpectUploads(image/png image/jpeg application/pdf) { ... } ``` ... which is fine, but the list of types to support grew longer and longer, not helped by some very long MIME types such as `application/vnd.openxmlformats-officedocument.wordprocessingml.document` So, I wanted to make it much more readable, for e.g.: ```perl sub index_POST: ExpectUploads( image/jpeg image/png image/bmp application/pdf application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ) { ... } ``` That looks like it should be fine, but failed, because the code in `Catalyst::Controller::_parse_attrs()` which parse subroutine attributes expected it to be all on line line. This change makes it work correctly for me, both for single-line attributes with and without a value and for multi-lined ones as per the example above too - and makes the parsing code a little more readable too, I think.
- Loading branch information