Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

schwern (1528)

  (email not shown publicly)
AOL IM: MichaelSchwern (Add Buddy, Send Message)

Schwern can destroy CPAN at his whim.

Journal of schwern (1528)

Sunday September 21, 2008
03:44 AM

New Method::Signatures, now without trailing semicolons!

[ #37502 ]

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 { ... }.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.