tags:

views:

149

answers:

1

To my dismay I noticed that MooseX::Method is no longer maintained and deprecated.

The package MooseX-Method-Signatures is advertized as replacement, but its documentation says: This is ALPHA SOFTWARE. Use at your own risk. Features may change.

<whine>What should I do </whine>

+5  A: 

Use MooseX::Declare instead:

use MooseX::Declare;

class Foo {
    has foo => (isa => "Str", is => "rw", default => "foo");

    method bar (Str $bar = "bar") {
        print $self->foo, " says $bar\n";
    }
}

Foo->new->bar;
Chas. Owens
MooseX::Declare uses MooseX::Method::Signatures internally for method handling.
perigrin
thanks! Let me try it .. the docs look very ok! I'm sure I'll have to fight that "class { .. }", I will my miss place my use-s often!
lexu