New Method::Signatures, now without trailing semicolons!

schwern on 2008-09-21T08:44:57

Matt Trout put out a new version of Devel::Declare with greatly expanded parser twisting capabilities. I stole his implementation of methods for Method::Signatures and pushed out a new version. Now you can write this:

    package Foo;

method bar($baz, $biff) { $self->whatever($baz, $biff); }


No source filters. No performance loss. [1] Just a terrifying toke.c hack.

Uhh, just don't run it in the debugger. Or as a one-liner. Or near small children. Do not operate near open flame. It's probably not all that bad.

Eliminating the trailing semi-colon was the last major hurdle. Now I'm clear to improve the prototype.

[1] This is not strictly true. There's a 2% performance drop for an empty method call. This is measuring an odd difference between *foo = sub { ... } and sub foo { ... }.