in reply to Using Shift with Parameters in a subroutine

The new signatures are documented in perlsub since 5.20, under Signatures.

The same, or a rather similar functionality can be enabled employing a source filter, but I think that the failure modes of a source-filter (introducing hard to debug syntax errors) are not really worth the nicer syntax for older Perl versions.

  • Comment on Re: Using Shift with Parameters in a subroutine

Replies are listed 'Best First'.
Re^2: Using Shift with Parameters in a subroutine
by RonW (Parson) on Oct 20, 2014 at 17:01 UTC

    FYI: Method::Signatures (and a few others) don't use source filters. Instead they use the keyword API introduced in Perl 5.14.