NAME
methods - Provide method syntax and autoclean namespaces
SYNOPSIS
use methods;
# with signature
method foo($bar, %opts) {
$self->bar(reverse $bar) if $opts{rev};
}
# attributes
method foo : lvalue { $self->{foo} }
# change invocant name
method foo ($class: $bar) { $class->bar($bar) }
# "1;" no longer required here
DESCRIPTION
This module uses Method::Signatures::Simple to provide named and anonymous methods with parameters, except with a shorter module name.
It also imports namespace::autoclean so the method
helper function (as well as any imported helper functions) won't become methods in the importing module.
Finally, it also imports true so there's no need to put 1;
in the end of the importing module.
SEE ALSO
AUTHORS
唐鳳 <cpan@audreyt.org>
CC0 1.0 Universal
To the extent possible under law, 唐鳳 has waived all copyright and related or neighboring rights to methods.
This work is published from Taiwan.