Succinct MooseX::Declare method signature validation errors

后端 未结 2 1326
臣服心动
臣服心动 2021-02-05 23:15

I\'ve been a proponent of adopting Moose (and MooseX::Declare) at work for several months. The style it encourages will really help the maintainability of our codebase, but not

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 00:01

    Method::Signatures::Modifiers is a package which hopes to fix some of the problems of MooseX::Method::Signatures. Simply use it to overload.

    use MooseX::Declare;
    use Method::Signatures::Modifiers;
    
    class Foo
    {
        method bar (Int $thing) {
            # this method is declared with Method::Signatures instead of MooseX::Method::Signatures
        }
    }
    

提交回复
热议问题