Nov 26

I’ve been meaning to try Method::Signatures::Simple ever since the last YAPC and just finally found the time. Something about typing “my ($self) = @_” for the millionth time pushing me over the edge.

Converted a random module in Mason 2. Reduced the number of lines by 65 (10%) and I feel like I’m developing in a modern language again. I’m hooked! Hats off to Rhesa Rozendaal and those responsible for the underlying Devel::Declare.

Now I’m eager to convert Mason 2 and possibly CHI to this across the board. The question is, is it reasonable for me to use this in published CPAN modules? It seems like very few CPAN modules do, and given how clearly awesome it is :) , I’m wondering if there is a reason, other than not wanting the extra dependency or not wanting to depend on “black magic”.

One snag is that perltidy (which I use rigorously on commit) doesn’t yet recognize the ‘method’ keyword. I managed to fix by patching Perl::Tidy to allow arbitrary transformations before and after tidying – so I can replace ‘method’ with ‘sub’ beforehand and convert back afterwards. Will attempt to contribute this back.

preload preload preload