Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Shouldn't it be called Method::Signatures::Lite?
    • I guess that depends on how you define "Lite" and "Simple" which are pretty ambiguous. The fad now-days seems to be towards "Simple" which usually means "simpler interface, but less features".

      It's not as ambitious as Method::Signatures, and it's missing a lot of features. This greatly simplifies the code, since it doesn't have to do any fancy parsing of the prototype. It makes it much more predictable as to what the result will be, and can reach stability faster (pending Devel::Declare stability). It just takes the prototype and puts it on the LHS of an @_ assignment.

      use Method::Signatures::Simple;
       
      method foo($foo, $bar) {
          ...
      }

      becomes

      sub foo {
          my $self = shift;
          my($foo, $bar) = @_;
       
          ...
      }

      and that's that. It's an 80/20 solution.