schwern/method-signatures — pull request #96 by schwern (2014-03-06 21:38:13+00:00)
Title: Refactor signature parsing into its own class

This moves all the code for tokenizing, parsing and checking signatures and parameters into its own class, the awkwardly named Method::Signatures::Signature. This makes the code make more sense and it is potentially easier to test and work with separate from the Devel::Declare madness.

Right now this is an internal refactoring. The eventual external goal is to provide a way for users to parsed and examine signatures separate from the whole Devel::Declare thing like Parse::Method::Signatures does. The immediate use is to replace PMS in TryCatch to de-Moosify and speed up TryCatch's load time.

It would also make sense to move the code generation functionality into MS::Signature and MS::Parameter, leaving MS to deal just with the Devel::Declare magic, but that can happen later.

As this touches a lot of code, it would be good to see this merged sooner rather than later. I did my best to break it up into reviewable chunks.