| ÅؽºÆ® :: ÅÛÇø´ ÅؽºÆ® :: ÅÛÇø´Àº ÆÞ½º ÆÞ½º·Î ÅÛÇø´ ÅؽºÆ®¸¦ È®ÀåÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
ÅؽºÆ® :: ÅÛÇø´ ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Mark Jason Dominus
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~mjd/
ÅؽºÆ® :: ÅÛÇø´ ű×
ÅؽºÆ® :: ÅÛÇø´ ¼³¸í
text :: ÅÛÇø´Àº ÆÞ½º ÆÞ½º°¡ÀÖ´Â ÅÛÇø´ ÅؽºÆ®¸¦ È®ÀåÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. text :: ÅÛÇø´Àº ÅÛÇø´ ÅؽºÆ®¸¦ embedded perl.synopsis·Î È®ÀåÇÏ´Â perl ¸ðµâÀÔ´Ï´Ù. ÅؽºÆ® :: ÅÛÇø´À» »ç¿ëÇÕ´Ï´Ù. $ template = text :: template-> new (type => ÆÄÀÏ ', ¼Ò½º =>'filename.tmpl '); $ template = text :: template-> new (type => '¹è¿', ¼Ò½º => ); $ template = text :: template-> new (type => 'filehandle', source => $ fh); $ template = text :: template-> new (type => 'string', source => '...'); $ template = text :: template-> new (prepend => q {strict;}, ...); # ´Ù¸¥ ÅÛÇø´ ÆÄÀÏ »ç¿ë ±¸¹® : $ template = text :: template-> new (deprimiters => , ...); $ ¼ö½ÅÀÚ = '¿Õ'; $ text = $ template-> fill_in (); #`king 'Àμâ $ text·Î`{$ ¼ö½ÅÀÚ}'À» ´ëüÇÕ´Ï´Ù. $ T :: ¼ö½ÅÀÚ = 'josh'; $ text = $ template-> fill_in (package => t); # ¸¹Àº º¯¼ö¸¦ ¸í½Ã ÀûÀ¸·Î ¸í½Ã ÀûÀ¸·Î $ Çؽà = {¼ö½ÅÀÚ => ''³ª ','´ç½Å ', ¿ø¼ö => {loathsome =>'bill gates ', fearsome =>'·¡¸® ¿¤¸®½¼ ' },}; $ text = $ template-> fill_in (hash => $ hash, ...); # $ ¼ö½ÅÀÚ´Â ~ # @friendsÀÔ´Ï´Ù. # @friends´Â ( '³ª', '´ç½Å'), # % ÀûÀǵéÀÌ (ÀÒ¾î¹ö¸° Àû => ..., ¹«½Ã ¹«½Ã => ...) # ÇÁ·Î±×·¡¹Ö ¿À·ù°¡ ¹ß»ýÇÑ °æ¿ì Äݹé Äݹé ÅÛÇø´ $ text = $ template-> fill_in (broken => callback, broken_arg => $ ref, ...); # Á¦ÇÑµÈ »ç¿ë ±ÇÇÑÀÌÀÖ´Â ¾ÈÀüÇÑ ±¸È¹¿¡¼ ÇÁ·Î±×·¥ Á¶°¢À» Æò°¡ÇÕ´Ï´Ù $ text = $ template-> fill_in (safe => $ quast, ...); # $ SUCCESS = $ TEMPLOTE-> FILL_IN (OUTPUT => * FILEHANDLE, ...)À» ¹ÝȯÇÏ´Â ´ë½Å Àμ⠰á°ú ÅؽºÆ® # ´Ù¸¥ ÅÛÇø´ ÆÄÀÏ ±¸¹®ÀÌÀÖ´Â ±¸¹® ºÐ¼® ÅÛÇø´ : $ text = $ template-> fill_in (deprimiters => , ...); # ±âº» ±¸ºÐ ±âÈ£°¡ ±âº» ±¸ºÐ ±âÈ£¸¦ »ç¿ëÇÏ´Â °Íº¸´Ù * ´õ »¡¶óÁö´Â °ÍÀÔ´Ï´Ù. $ text = $ template-> fill_in (prepend => q {strict 'vars';}, ...) ...¿¡ ÅؽºÆ® :: ÅÛÇø´ 'fill_in_string'À» »ç¿ëÇϽʽÿÀ. $ text = fill_in_string (¿ä±¸ »çÇ× : ¡¤ Perl.
ÅؽºÆ® :: ÅÛÇø´ °ü·Ã ¼ÒÇÁÆ®¿þ¾î