Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想设置一个由其他较小角色组成的便利 Moose 角色。例如,如果我有 WithAddress 和 WithPhone,我想要一个 WithContacts,它同时提供 WithAddress 和 WithPhone 以及我将来添加的任何联系方式。
我怎么能用 Moose 做到这一点?
package WithContacts; use Moose::Role; with qw(WithAddress WithPhone); # anything else your role should do no Moose::Role; 1;
新的热点是«use namepace::autoclean;» 而不是«没有驼鹿;» 和«没有驼鹿::角色;»
如果您想听到更多 cjs 的消息 :-)