| CGI :: FastTemplate. CGI :: FastTemplate´Â ÅÛÇø´ °ü¸®¸¦À§ÇÑ Perl È®ÀåÀÚÀÌ¸ç °¡º¯ º¸°£À» ¼öÇàÇÕ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
CGI :: FastTemplate. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~jmoore/CGI-FastTemplate-1.09/FastTemplate.pm
CGI :: FastTemplate. ű×
CGI :: FastTemplate. ¼³¸í
CGI :: FastTemplate´Â ÅÛÇø´ °ü¸® ¹× °¡º¯ º¸°£À» ¼öÇàÇϱâÀ§ÇÑ Perl È®ÀåÀÚÀÔ´Ï´Ù. CGI :: FastTemplate´Â ÅÛÇø´ °ü¸®¸¦À§ÇÑ Perl È®ÀåÀÚÀÌ¸ç °¡º¯ º¸°£À» ¼öÇàÇÕ´Ï´Ù. CGI :: FastTemplateÀ» »ç¿ëÇÕ´Ï´Ù. $ tpl = »õ CGI :: FastTemplate (); $ tpl = »õ CGI :: FastTemplate ( "/ path / to / templates"); CGI :: FastTemplate-> set_root ( "/ path / to / templates"); ## ¸ðµç ÀνºÅϽº´ÂÀÌ °æ·Î $ tpl-> set_root ( "/ path / to / templates")¸¦ »ç¿ëÇÕ´Ï´Ù. ##ÀÌ ÀνºÅϽº´ÂÀÌ °æ·Î $ tpl-> Á¤ÀÇ (main => "main.tpl", row => "table_row.tpl", all => "table_all.tpl")¸¦ »ç¿ëÇÕ´Ï´Ù. $ TPL-> ASSIGN (Á¦¸ñ => "Á¦¸ñ)."); ³» À߸ø = (font => ", À̸ÞÀÏ => 'jmoore@sober.com'); $ tpl-> ÇÒ´ç (¿À·ù); $ TPL-> ±¸¹® ºÐ¾ß (Çà => ".Row"); ## '.' Çà $ tpl-> ±¸¹® ºÐ¾ß (content => ","all "])·Î Ãß°¡ÇÕ´Ï´Ù. $ TPL-> ±¸¹® (content => "main"); $ tpl-> print (); ## ¸¶Áö¸· ±¸¹® ºÐ¼® µÈ $ TPL-> Àμâ ( "ÄÜÅÙÃ÷"); ## Àμâ ()¿Í µ¿ÀÏÇÑ "ÄÜÅÙÃ÷"´Â ¸¶Áö¸· ±¸¹® ºÐ¼®µÇ¾ú½À´Ï´Ù $ ref = $ tpl-> fetch ( "content"); ¿ä±¸ »çÇ× : ¡¤ perl ¿ä±¸ »çÇ× : ¡¤ Perl.
CGI :: FastTemplate. °ü·Ã ¼ÒÇÁÆ®¿þ¾î