Revert incorrect fixes for parsing of attributes with empty parens
authorThomas Sibley <tsibley@cpan.org>
Fri, 6 Nov 2015 02:51:30 +0000 (18:51 -0800)
committerMatt S Trout <mst@shadowcat.co.uk>
Sat, 7 Nov 2015 05:13:42 +0000 (05:13 +0000)
commit1d00b2ffb8806bd0a8190ee8580a85895e48f8e4
tree3d207844b2772ac6a6589abf9cbdcff7b21d0b28
parent1c20c63931df63b579c27cf822bc933211d33df9
Revert incorrect fixes for parsing of attributes with empty parens

This partially reverts commits:

  • "Args() wasn't being processed as unlimited number of args, due to…" (43b44b3)
  • "Fixed :Path() empty brackets attribute not registering action. Fixes: #104" (dd6a9f2)

leaving the tests added by them for the Path() bug in GH #104 but
reverting the code changes.

The code changes caused Attribute() to parse equivalent to Attribute('')
instead of Attribute.  The mistake was not noticed because Path, Path(),
and Path('') should all produce equivalent behaviour.  However, the same
is not true of other attributes.  For example, Args.

Parsing empty parens as undef rather than an empty string is the correct
solution.  Empty strings are achieved explicitly with Attribute('').

Reverting these changes fixes the regression in the handling of Args(),
which started producing the following error at app startup under debug
mode:

    Out of memory during list extend
    at .../Catalyst/DispatchType/Chained.pm line 101.

The following commit will make the correct fix.
lib/Catalyst/Action.pm
lib/Catalyst/Controller.pm