Method::Signatures is a Perl module that offers method declarations with signatures and no source filter.
SYNOPSIS
package Foo;
use Method::Signatures;
method new (%args) {
return bless {%args}, $self;
}
method get ($key) {
return $self->{$key};
}
method set ($key, $val) {
return $self->{$key} = $val;
}
This is ALPHA SOFTWARE which relies on YET MORE ALPHA SOFTWARE. Use at your own risk. Features may change.
Provides a proper method keyword, like "sub" but specificly for making methods. It will automatically provide the invocant as $self. No more my $self = shift.
Also allows signatures, very similar to Perl 6 signatures.
And it does all this with no source filters.
Product's homepage
Requirements:
· Perl