½ºÅ©¸³Æ® :: À̷¼½ÇÇà Áß°£¿¡ Áß´Ü ÇÒ ¼öÀÖ´Â ½ºÅ©¸³Æ®¿¡ ´ëÇÑ State Keeper´Â ³ªÁß¿¡ È£Ãâ¿¡¼ Áß´Ü ÇÑ °÷¿¡¼ ÇȾ÷ÇؾßÇÕ´Ï´Ù. | |
Áö±Ý ´Ù¿î·Îµå |
½ºÅ©¸³Æ® :: À̷¼ ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Perl Artistic License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Robert Powers
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~batman/
½ºÅ©¸³Æ® :: À̷¼ ű×
½ºÅ©¸³Æ® :: À̷¼ ¼³¸í
½ÇÇà Áß°£¿¡ Áß´Ü ÇÒ ¼öÀÖ´Â ½ºÅ©¸³Æ®¿¡ ´ëÇÑ State Keeper´Â ³ªÁß¿¡ È£Ãâ¿¡¼ Áß´Ü ÇÑ °÷¿¡¼ ÇȾ÷ÇؾßÇÕ´Ï´Ù. Script :: Resume´Â ½ÇÇà Áß°£¿¡ Áß´Ü µÉ ¼öÀÖ´Â ½ºÅ©¸³Æ®ÀÇ »óÅ ŰÆÛÀÌÁö¸¸ ³ªÁß¿¡ È£Ãâ¿¡¼ Áß´Ü µÈ À§Ä¡¸¦ ¼±ÅÃÇؾßÇÕ´Ï´Ù. Synopsis ½ºÅ©¸³Æ® :: À̷¼¸¦ »ç¿ëÇؾßÇÕ´Ï´Ù. ³» $ state = {Robin => "Jason Todd"}; $ rez = »õ ½ºÅ©¸³Æ® :: À̷¼ (script_state => $ state, stage => ; $ rez-> addStage ( "oh_and_this_too", func => this_too, Ç×»ó => 1); $ rez-> runallstages (); Àμâ "°á°ú : Robin = $ state -> {Robin} "¼ºê DO_THIS {Àμâ"ÇÏ°í ÀÖ½À´Ï´Ù. ";} sub then_that {print"³ª´Â ±×°ÍÀ»ÇÏ°íÀÖ´Ù. "; $ state -> {Robin} ="µñ ±×·¹À̽¼ ";} sub finally_this {print"³ª´Â ¸¶Ä§³» ÀÌ°ÍÀ»ÇÏ°í ÀÖ½À´Ï´Ù. ", $ state -> {Robin} ="ÆÀ µå·¹ÀÌÅ© ";} sub this_too {print"µµÀÌ ÀÏÀ»ÇÏ°í ÀÖ½À´Ï´Ù. ";} ´õ ¸¹Àº ¸í½Ã Àû Á¦¾î¿Í ÇÔ²² ½ÇÇàµÇ´Â ½ºÅ©¸³Æ®°¡ ÀÖ½À´Ï´Ù ½ºÅ©¸³Æ® :: À̷¼; My $ Robin; My $ Robin; My $ Rez = »õ ½ºÅ©¸³Æ® :: Resume (); $ rez-> addStage (" my_first_stage ", func => stage_one); $ rez-> addStage ("my_second_stage ", func => addstage); $ rez-> addStage ("my_third_stage ", func => stage_three); $ robin = $ rez-> runstage ( "my_first_stage", "Jason Todd"); Àμâ "°á°ú : Robin 1 = $ Robin "; $ Robin = $ rez-> runStage ("my_second_stage ","dick grayson "); Àμâ"°á°ú : ·Îºó 2 = $ Robin "; $ Robin = $ rez-> runStage ("my_third_stage ","ÆÀ µå·¹ÀÌÅ© "); Àμâ"°á°ú : Robin3 = $ Robin "; sub stage_one {¹Ýȯ ½ÃÇÁÆ®;} ÇÏÀ§ stage_two {¹Ýȯ ½ÃÇÁÆ®;} sub stage_three {Return shift;} script :: ResumeÀ» »ç¿ëÇÏ¸é ½ºÅ©¸³Æ®°¡ ¾îµò°¡¿¡ÀÖ´Â ½ºÅ©¸³Æ®°¡ º¸±ÞµÇ´Â °æ¿ì ½ºÅ©¸³Æ®°¡ ÀÚµ¿À¸·Î ½ºÅ©¸³Æ®¸¦ ´Ü°èÀûÀ¸·Î ²÷À» ¼ö ÀÖ½À´Ï´Ù. ¹®Á¦¸¦ ÇØ°áÇÏ°í ½ºÅ©¸³Æ®¸¦ Àç½ÇÇà ÇÒ ¼ö ÀÖÀ¸¸ç ÀÌÀü »óÅÂ¿Í ¸ðµç °ÍÀ¸·Î Áß´Ü µÈ °÷À¸·Î ÇȾ÷ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ°ÍÀº óÀ½ºÎÅÍ ´Ù½Ã ½ÃÀÛÇÒ ¼ö¾ø´Â ÀÛ¾÷¿¡ À¯¿ëÇÕ´Ï´Ù. ´ë±Ô¸ð ÆÄÀÏÀ» º¹»çÇÏ´Â °Í°ú °ü·ÃµÈ ½ºÅ©¸³Æ®´Â $ env {temp} / $ 0.State ¶Ç´Â /tmp/$0.State (¶Ç´Â ÁöÁ¤ÇÑ °æ¿ì)¿¡¼ ÀÏ¹Ý µ¥ÀÌÅÍ :: Dumper Çü½Ä ÆÄÀÏ·Î À¯ÁöµË´Ï´Ù. ´Ù½Ã ½ÇÇàÇϱâ Àü¿¡ Á¶Á¤ÇϽʽÿÀ. ±×°ÍÀº ¸ðµç ´Ü°èÀÇ ¸ðµç ¹Ýȯ °ª°ú ÇÔ²² »ý¼ºÀÚ¿¡ Àü´ÞÇÏ´Â script_state¸¦ ÀúÀåÇÕ´Ï´Ù. ½ºÅ×ÀÌÁö°¡ ÀÌÀü¿¡ ½ºÅ©¸³Æ® È£Ãâ¿¡¼ ÀÌ¹Ì ½ÇÇà µÈ °æ¿ì ½ÇÁ¦·Î ¹Ýȯ °ªÀÌ ¹ÝȯµË´Ï´Ù. ½ºÅ×ÀÌÁö¸¦ ´Ù½Ã ½ÇÇàÇϽʽÿÀ. ¿ä±¸ »çÇ× : ¡¤ Perl.
½ºÅ©¸³Æ® :: À̷¼ °ü·Ã ¼ÒÇÁÆ®¿þ¾î