Wrap all TC inlining in parens and a do { } block
authorDave Rolsky <autarch@urth.org>
Mon, 25 Apr 2011 01:57:10 +0000 (20:57 -0500)
committerJesse Luehrs <doy@tozt.net>
Tue, 17 May 2011 23:53:38 +0000 (18:53 -0500)
commite6fff671dff8280278b41a0217aeb59111a8f145
treea2b3c7026cce34731fd872c9703ba3a306a12e28
parent576c9cfccb583b51f27bc6e0bfbc51eecb95dfc9
Wrap all TC inlining in parens and a do { } block

The parens protect against precedence issues when being used with logical operators.

The do { } block provides each TC its own scope, so that if it defines variables they don't leak out to the enclosing code.
lib/Moose/Meta/TypeConstraint.pm
lib/Moose/Meta/TypeConstraint/Parameterizable.pm
lib/Moose/Util/TypeConstraints/Builtins.pm
t/type_constraints/inlining.t