| ¾Û :: ¸ðµâ Çü :: ¸ðµâ :: À̺¥Æ® App :: Modular :: Module :: À̺¥Æ®´Â App :: Modular ȣȯ ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ À̺¥Æ® 󸮰¡ÀÖ´Â Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
¾Û :: ¸ðµâ Çü :: ¸ðµâ :: À̺¥Æ® ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Baltasar Cevc
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~bcevc/App-Modular-0.1.2/contrib/Events.mom
¾Û :: ¸ðµâ Çü :: ¸ðµâ :: À̺¥Æ® ű×
¾Û :: ¸ðµâ Çü :: ¸ðµâ :: À̺¥Æ® ¼³¸í
App :: Modular :: Module :: À̺¥Æ®´Â App :: Modular ȣȯ ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ À̺¥Æ® 󸮰¡ÀÖ´Â Perl ¸ðµâÀÔ´Ï´Ù. App :: Modular :: Module :: À̺¥Æ®´Â App :: Modular ȣȯ ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ À̺¥Æ® 󸮰¡ÀÖ´Â Perl ¸ðµâÀÔ´Ï´Ù. ########################## PAGAME APP :: MODULA : : ¸ðµâ :: ³ª; ±âº» QW (app :: modular :: module)¸¦ »ç¿ëÇϽʽÿÀ. ÇÏÀ§´Â {¹Ýȯ 'À̺¥Æ®'ÀÇÁ¸ÇÕ´Ï´Ù. } sub start_listen {³» $ self = shift; $ self -> {modularizer '} -> ¸ðµâ ('À̺¥Æ® ') -> µî·Ï ('Listener ','telephonerings '); }; sub event_handler {³» $ self = shift; ³» $ À̺¥Æ® = À̵¿; Àμâ '¿¹! ´©±º°¡ ³ª¿¡ ´ëÇØ »ý°¢Çß´Ù! ' if ($ À̺¥Æ® EQ 'Àüȱâ'); }; ###################################################### ################## ÆÐÅ°Áö ¾Û :: ¸ðµâ Çü :: ¸ðµâ ::; ±âº» QW (app :: modular :: module)¸¦ »ç¿ëÇϽʽÿÀ. ÇÏÀ§´Â {¹Ýȯ 'À̺¥Æ®'ÀÇÁ¸ÇÕ´Ï´Ù. } sub call_me {$ self -> {modularizer '} -> ¸ðµâ ('À̺¥Æ® ') -> Æ®¸®°Å ('Àüȱâ); }; ###################################################### ########### PACKAGE MAIN; App :: Modular¸¦ »ç¿ëÇϽʽÿÀ. ³» $ modul = ÀνºÅϽº ÀÀ¿ë ÇÁ·Î±×·¥ :: ¸ðµâ·¯; $ modul-> ¸ðµâ ( 'me') -> start_listen (); $ modul-> ¸ðµâ ( '´ç½Å') -> callme (); Á¾·á; App :: Modular´Â ¾î¶² Á¾·ùÀÇ ¸ðµâ·¯ ÇÁ·Î±×·¥À» ¸¸µé ¼öÀÖ´Â ÇÁ·Î±×·¥ÀÌ ½±°Ô ¸¸µé¾î¾ßÇÏ´Â ÇÁ·¹ÀÓ ¿öÅ©¸¦ Á¦°øÇÏ´Â °ÍÀ» ¸ñÇ¥·ÎÇÕ´Ï´Ù.ÀÌ ¸ðµâÀº ÇØ´ç ÅøŶ¿¡ ´ëÇÑ ±â¿©·Î ±âº» À̺¥Æ® 󸮸¦ Á¦°øÇÕ´Ï´Ù. ¸ðµâÀº À̺¥Æ®¸¦ ¸®½º³Ê·Î µî·Ï ÇÒ ¼ö ÀÖ½À´Ï´Ù. À̺¥Æ®°¡ Æ®¸®°ÅµÇ¸é $ module-event_handler ( 'À̺¥Æ®', @Params)>¸¦ È£ÃâÇÏ¿© ¸ðµç ¸ðµâÀ» ÅëÁö¹Þ½À´Ï´Ù. À̺¥Æ®´Â °£´ÜÇÑ ¹®ÀÚ¿·Î ÁöÁ¤µË´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
¾Û :: ¸ðµâ Çü :: ¸ðµâ :: À̺¥Æ® °ü·Ã ¼ÒÇÁÆ®¿þ¾î