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.
他の小さな役割で構成される便利なムースの役割を設定したいと思います。たとえば、WithAddressとWithPhoneがある場合、WithAddressとWithPhoneの両方、および将来追加する連絡方法を提供する単一のWithContactsが必要です。
Mooseでこれを行うにはどうすればよいですか?
package WithContacts; use Moose::Role; with qw(WithAddress WithPhone); # anything else your role should do no Moose::Role; 1;
新しい辛さは«usenamepace::autoclean;»です。«ムースなし;»の代わりに および«Moose::Roleなし;»
もっとcjsから聞きたい場合:-)