Method::Signatures: here a tweak, there a bugfix


Just a quick note to say that I’ve released a new version of Method::Signatures today.  There’s nothing major, just a few housekeeping duties.  Here’s the highlights:

  • Previously, you weren’t able to mix alias parameters and named parameters.  Now, thanks to a patch from the Damian and schwern fixing a buglet on 5.8 and 5.10 that had confounded me for the past month or so, you can.
  • Previously, run-time errors were pretty nice looking, with fairly precise line number reporting.  The compile-time errors, such as the ones you get when your signatures don’t parse correctly, were not as nice.  This is fixed now (this is the only one I actually did myself).
  • If you’d like the run-time errors to do something other than die, you can now override the new signature_error_handler method in a subclass.  Thanks to larryl for the patch.
  • Our use of Data::Alias was causing a bug when used in conjunction with threads.  Happily, schwern has put in code which will only load Data::Alias on demand, avoiding the bug at least in the cases where you use threads but not alias parameters, and also speeding up our compile-time performance a bit.

Hopefully you find these tidbits helpful.  Let us know—here, on GitHub, or in an RT ticket—if you see any problems, or want to make any suggestions.  Enjoy!

6 Comments

Much appreciated, as always!

Method::Signatures must be the most important new module for Perl right now.

Buddy - have their been any performance comparisons for MS vs. other modules providing similar if less comprehensive functionality eg. Method::Signatures::Simple.

I'll chime in and say that Method::Signatures has made writing perl much, much nicer! I use the named parameter support all the time. Thanks for the work you put into it maintaining the module.

Leave a comment

About Buddy Burden

user-pic 14 years in California, 25 years in Perl, 34 years in computers, 55 years in bare feet.