| ±¸¼º :: ÆÐÄ¡ ±¸¼º :: ÆÐÄ¡ Perl ¸ðµâÀ» »ç¿ëÇÏ¿© ±¸¼º ÆÄÀÏÀ» ÆÐÄ¡ÇÏ°í ³ªÁß¿¡ ¹èÄ¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
±¸¼º :: ÆÐÄ¡ ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Mike Schilli
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~mschilli/X10-Home-0.03/Home.pm
±¸¼º :: ÆÐÄ¡ ű×
±¸¼º :: ÆÐÄ¡ ¼³¸í
config :: ÆÐÄ¡ Perl ¸ðµâÀ» »ç¿ëÇÏ¿© ±¸¼º ÆÄÀÏÀ» ÆÐÄ¡ÇÏ°í ³ªÁß¿¡ ¹èÄ¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. Config :: ÆÐÄ¡ Perl ¸ðµâÀ» »ç¿ëÇÏ¿© ±¸¼º ÆÄÀÏÀ» ÆÐÄ¡ÇÏ°í ³ªÁß¿¡ ¹èÄ¡ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ½Ä ³ëÇÁ°¡ Config :: Patch¸¦ »ç¿ëÇϽʽÿÀ. MY $ PATCHER = CONFIG :: PATCH-> NEW (file => "/etc/syslog.conf", key => "myPatch",); # ÆÐÄ¡¸¦ Ãß°¡ÇϽʽÿÀ : $ patcher-> append (q {# ³» ¹°°Ç my. * / var / log / my}); # /etc/syslog.conf¿¡ ´ÙÀ½À» Ãß°¡ÇÕ´Ï´Ù. * ---------------------------------------------------- ------ ... | # (config :: patch-mypatch-append) | # ³» ¹°°ÇÀ» ±â·ÏÇϽʽÿÀ | ³». * / var / log / my | # (config :: patch-mypatch-append) * ------------------------------------------------------------------------------------------------------------------ ----- # prepend a prepend a prepend : prepend (q {# ³» ¹°°Ç ³» °Í * / var / log / my}); # /etc/syslog.conf¿¡ ´ÙÀ½À» Ãß°¡ÇϽʽÿÀ : * ------------------------------------ ------ # (config :: patch-mypatch-append) | # ³» ¹°°ÇÀ» ±â·ÏÇϽʽÿÀ | ³». * / var / log / my | # (config :: patch-mypatch-append) | ... *------------------------------------------- # ³ªÁß¿¡ ÆÐÄ¡¸¦ Á¦°ÅÇÏ·Á¸é $ patcher-> remove (); config :: ÆÐÄ¡´Â ±¸¼º ÆÄÀÏÀ» º¯°æÇÏ°í º¯°æ »çÇ×À» ±â¾ïÇÏ°í ÇÊ¿äÇÑ °æ¿ì ½ÇÇà Ãë¼Ò¸¦ µ½½À´Ï´Ù. º¯°æ ³»¿ëÀº ³ªÁß¿¡ ½ÇÇà Ãë¼Ò¸¦ Çã¿ëÇÕ´Ï´Ù. »ç¿ë¹ýÀ» ÃËÁøÇÏ·Á¸é ±¸¼º :: ÆÐÄ¡´Â ¸ðµç ±â´ÉÀ» ¼öÇàÇÏ´Â ¸í·É ÁÙ ½ºÅ©¸³Æ®¿Í ÇÔ²² Á¦°øµË´Ï´Ù. # ÆÐÄ¡ ¿¡ÄÚ¸¦ Ãß°¡ "³» ÆÐÄ¡ ÅؽºÆ®"| config-patch -a -k Å° -f textfile # °Ë»ö ¹× ¹Ù²Ù±â ¿¡ÄÚ "None :"·Î ÆÄÀÏ ÆÐÄ¡ config-patch -s 'all :. *'-k Å° -f config_file # ÁÖ¼®Àº Á¤±Ô Ç¥Çö½ÄÀ¸·Î ÀÏÄ¡ÇÏ´Â ¼½¼Ç : config-patch -c '(ms-xi : ^ all :. *? nn)'-K KEY -F CONFIG_FILE # ÀÌÀü¿¡ Àû¿ëµÈ ÆÐÄ¡ config-patch -r -k Å° -f textFileNote ÆÐÄ¡ ÇÁ·Î±×·¥¿¡¼ »ç¿ëÇÏ´Â Çü½ÄÀÇ ÆÐÄ¡¸¦ ÂüÁ¶ÇÏÁö´Â ¾ÊÁö¸¸ »ðÀÔ µÈ ÅؽºÆ®ÀÇ ÀÓÀÇÀÇ ¼½¼Ç¿¡ ÆÄÀÏ. ÆÐÄ¡´Â Çà ±â¹ÝÀÔ´Ï´Ù. config :: ÆÐÄ¡´Â Ç×»ó Àüü ÁÙÀ» Ãß°¡ / Á¦°ÅÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
±¸¼º :: ÆÐÄ¡ °ü·Ã ¼ÒÇÁÆ®¿þ¾î