NAME

Sub::Args - Simple check/get arguments.

SYNOPSIS

use Sub::Args;
sub foo {
    my $args = args(
        {
            name => 1,
            age  => 0,
        }
    );
    $args;
}

# got +{name => nekokak}
foo(
    {
        name => 'nekokak',
    }
);

# got +{name => 'nekokak', age => 32}
foo(
    {
        name => 'nekokak',
        age  => 32,
    }
);

# nick parameter don't defined for args method.
foo(
    {
        name => 'nekokak',
        age  => 32,
        nick => 'inukaku',
    }
);

# name arguments must required. for die.
foo(
    {
        age => 32,
    }
);

DESCRIPTION

This module makes your module more readable, and writable =p

AUTHOR

Atsushi Kobayashi <nekokak _at_ gmail _dot_ com>

CONTRIBUTORS

hirobanex : Hiroyuki Akabane

SEE ALSO

Params::Validate

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.