Params::Smart

Use both positional and named arguments in a subroutine
Download

Params::Smart Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Robert Rothenberg
  • Publisher web site:
  • http://search.cpan.org/~rrwo/

Params::Smart Tags


Params::Smart Description

Use both positional and named arguments in a subroutine Params::Smart is a Perl module to use both positional and named arguments in a subroutine.SYNOPSIS use Params::Smart 0.04; sub my_sub { %args = Params(qw( foo bar ?bo ?baz ))->args(@_); ... } my_sub( foo=> 1, bar=>2, bo=>3 ); # call with named arguments my_sub(1, 2, 3); # same, with positional argsThis module provides "smart" parameter handling for subroutines without having to use a changed syntax or source filters. Features include: * Mixed use of named and positional parameters. * Type checking and coercion through callbacks. * Dyanmic parameters configured from callbacks. * Memoization of parameter templates. Requirements: · Perl


Params::Smart Related Software