| Ŭ·¡½º :: MOP :: Class. Ŭ·¡½º :: MOP :: Ŭ·¡½º´Â Ŭ·¡½º ¸ÞŸ °´Ã¼ÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Ŭ·¡½º :: MOP :: Class. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Stevan Little
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~stevan/Devel-StrictObjectHash-0.01/lib/Devel/StrictObjectHash.pm
Ŭ·¡½º :: MOP :: Class. ű×
Ŭ·¡½º :: MOP :: Class. ¼³¸í
Ŭ·¡½º :: MOP :: Ŭ·¡½º´Â Ŭ·¡½º ¸ÞŸ °´Ã¼ÀÔ´Ï´Ù. class :: mop :: class´Â Ŭ·¡½º meta object.synopsis # Ŭ·¡½º foo #ÀÌ Á¤ÀǵǾú´Ù°í °¡Á¤Çϸé, ³» ÀÎÆ®·Î ½ºÆå ¼Ç¿¡ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù ... # foo -> meta-> add_method¿¡ ¸Þ¼Òµå¸¦ Ãß°¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù ... foo-> meta-> add_method ( 'bar'=> sub {... ...}) # °Ë»öµÈ ¸ðµç Ŭ·¡½º ¸ñ·Ï °¡Á® ¿À±â # ¿Ã¹Ù¸¥ ¼ø¼ÀÇ ¸Þ¼Òµå µð½ºÆÐó foo-> meta-> class_precedence_list () # foo foo-> meta- > remove_method ( 'bar'); # ¶Ç´Â ½ÇÁ¦·Î Ŭ·¡½º¸¦ ¸¸µì´Ï´Ù. Ŭ·¡½º :: mop :: class-> create ( 'bar'=> (¹öÀü => '0.01', ¼öÆÛ Å¬·¡½º => , ¸Þ¼Òµå => {calculate_bar => sub {...}, construct_baz => sub {...}}); ÀÌ°ÍÀº Perl 5 ¸ÞŸ °´Ã¼ ÇÁ·ÎÅäÄÝÀÇ °¡Àå Å©°í ÇöÀç °¡Àå º¹ÀâÇÑ ºÎºÐÀÔ´Ï´Ù. Perl 5 Ŭ·¡½ºÀÇ ³»¼º°ú Á¶ÀÛÀ» Á¦¾îÇÕ´Ï´Ù (±×¸®°í ±×°ÍÀº ³Ê¹« ¸¹ÀÌ ¸¸µé ¼ö ÀÖ½À´Ï´Ù). ÀÌ ¸ðµâÀÌ ¼öÇà ÇÒ ¼öÀÖ´Â °ÍÀ» ÀÌÇØÇÏ´Â °¡Àå ÁÁÀº ¹æ¹ýÀº °¢°¢ÀÇ ¹æ¹ý¿¡ ´ëÇÑ ¹®¼¸¦ Àд °ÍÀÔ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
Ŭ·¡½º :: MOP :: Class. °ü·Ã ¼ÒÇÁÆ®¿þ¾î