Mooseã®ã¢ããªãã¥ã¼ãã«ã¯å¤ãã®ããããã£ãããã¾ããã¢ããªãã¥ã¼ãã¯ããããMooseã®æ©è½ã¨ãã¦ã¯ãã°æãã¦å¼·åã§æè»ãªãã®ã§ãããã¢ããªãã¥ã¼ãã宣è¨ããã ãã§å¼·åãªã¯ã©ã¹ãä½ãã¾ããå®éãã¢ããªãã¥ã¼ãã®å®£è¨ãããªãã¯ã©ã¹ãä½ããã¨ãã§ãã¾ãã ã¢ããªãã¥ã¼ãã¯ãããã¯ã©ã¹ã«å±ãããã¹ã¦ã®ã¡ã³ãã¼ãæã¤ããããã£ã§ãããã¨ãã°ããPersonãªãã¸ã§ã¯ãã«ã¯ããªããå§ã¨åããããã¨ããã¾ããã¾ããã¢ããªãã¥ã¼ãã¯çç¥å¯è½ã«ãããã¨ãã§ããã®ã§ããPersonãªãã¸ã§ã¯ãã®ä¸ã«ã¯ç¤¾ä¼ä¿éçªå·ãæã¤ãã®ãããï¼æããªããã®ãããï¼ãã¨ãããã¨ãã§ãã¾ãã ãã£ã¨ãåç´ãªä¾ã§ã¯ãã¢ããªãã¥ã¼ãã¯ï¼ããã·ã¥ã®ããã«ï¼èªã¿æ¸ãå¯è½ãªååä»ãã®å¤ã¨ãèãããã¾ãããã ããã¢ããªãã¥ã¼ãã®å ´åã¯ããã©ã«ãå¤ãåå¶ç´ããã£ãããå§è²ãªã©ãè¡ããã¨ãã§ãã¾ãã ã¢ããªãã¥ã¼ãã¯ãã»ãã®è¨èªã§ã¯ã¹
Mooseã«ã¯ãã¾ãã¾ãªæ©è½ãããã¾ããã使ãæ¹ã決ãã¦ä¸éãã§ã¯ããã¾ãããã§ãã使ãæ©è½ã¯ä¸é¨ã«ãã¼ã£ã¦ããã¤ãããã使ãããã«ããæ¹ããã¿ãªããã®ããã«ãªãã¨æãã¾ãã ãã¡ããã©ããªããã¹ããã©ã¯ãã£ã¹ãéã§ãããã§ããããããæ¬å½ã«ãã ã®æè¦ã«ããã¾ããã®ã§ãç¡è¦ãã¦ããã ãã¦ãçµæ§ã§ãã Mooseã®ã¯ã©ã¹å®ç¾©ã®æå¾ã«ã¯Mooseã®ã·ã¥ã¬ã¼é¢æ°ãåé¤ãã¦ã¯ã©ã¹ãä¸å¤åãããã¨ããããããã¾ãã package Person; use Moose; # extends, roles, attributes, etc. # methods no Moose; __PACKAGE__->meta->make_immutable; 1; no Mooseã®é¨åã¯Mooseãã¨ã¯ã¹ãã¼ããããã¼ã¯ã¼ããå ¨ã¦åãæããåã«ã³ã¼ãããããã«ããããã®ãã®ã§ããã¯ã©ã¹ãå®ç¾©ããå¾ã«ãããã®ãã¼
Mooseã¯ã¢ããªãã¥ã¼ãã®ããã«ç¬èªã®åã·ã¹ãã ãç¨æãã¦ãã¾ããã¾ããMooseXã¢ã¸ã¥ã¼ã«ã®å©ããåããã¨ãããã®åãã¡ã½ããã®ãã©ã¡ã¼ã¿ã®æ¤è¨¼ã«ä½¿ããã¨ãã§ãã¾ãã Mooseã®åã·ã¹ãã ã®ãã¨ã«ãªã£ãã®ã¯ãPerl 5èªèº«ã®ãæé»ã®ãåã¨ãPerl 6ã®ããã¤ãã®ã³ã³ã»ãããçµã¿åããããã®ã§ããç¬èªã®å¶ç´ã使ãã¨èªåã®ãµãã¿ã¤ããç°¡åã«ä½ãããããã©ã®ãããªç¨®é¡ã®æ¤è¨¼ã³ã¼ãã§ãç°¡åã«è¡¨ç¾ã§ãã¾ãã åã«ã¯ååãã¤ãã¦ããã®ã§ãåæãã§åå©ç¨ã§ãã¾ãããã®ããã大ããªã¢ããªã±ã¼ã·ã§ã³å ¨ä½ã§åãå ±æãããã¨ãç°¡åã«ã§ãã¾ãã ãã ããããã§æ確ã«ãã¦ããããã®ã¯ãããã¯ãæ¬å½ã®ãåã·ã¹ãã ã§ã¯ãªãã¨ãããã¨ãMooseã使ãã¨éæ³ã®åã§Perlãåã¨å¤æ°ãé¢é£ã¥ããããã«ãªãããã§ã¯ããã¾ãããããã¯åã«ååã¨å¶ç´ãé¢é£ã¥ããããé«åº¦ãªãã©ã¡ã¼ã¿ãã§ãã¯ã·ã¹ãã ã«ãããªãã®ã§ãã
Moose Quick-Ref Card A modern object system for Perl 5 Exported Functions use Moose; Turns on strict and warnings. Exports confess and blessed. extends @superclasses Mooseâs alternative to use base. Note that it will re-set @ISA. with @roles with $role => { %options } Consume roles (interfaces) as an alternative to extending classes. has $name => %options Install an attribute into this class. See
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}