tokuhirom's Blog

Yet another parameter validator interface for Perl5

I'm using Smart::Args these days, but some people say "Smart::Args is too smart.".

I suggest yet another interface for you:

package MyModule;
use LessSmart::Args;

sub foo {
  args(\my $class, 
          'foo' => \my $foo,
          'hidek' => \my $hidek => 'Int');
}

package main;
MyModule->foo(foo => 5, hidek => 40);

You can write a module like this :P

Enjoy!