| Swish :: Prog :: Doc. Swish :: Prog :: DocÀº Swish-E Àε¦¼¿¡ Àü´ÞÇϱâÀ§ÇÑ ¹®¼ °³Ã¼ÀÔ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
Swish :: Prog :: Doc. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Peter Karman
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~karman/CatalystX-CRUD-0.17/lib/CatalystX/CRUD/Tutorial.pod
Swish :: Prog :: Doc. ű×
Swish :: Prog :: Doc. ¼³¸í
Swish :: Prog :: DocÀº Swish-E Àε¦¼¿¡ Àü´ÞÇϱâÀ§ÇÑ ¹®¼ °³Ã¼ÀÔ´Ï´Ù. swish :: prog :: doc´Â swish-e indexer.synopsis # ÇÏÀ§ Ŭ·¡½º swish :: prog :: doc # ¹× create _filter () ¸Þ¼µå¸¦ ¸¸µé±âÀ§ÇÑ ¹®¼ °³Ã¼ÀÔ´Ï´Ù. My :: prog :: doc »ç¿ëº£À̽º qw (swish : swish : swish : swish : : prog :: doc); SUB URL_FILTER {MY $ DOC = SHIFT; ³» $ URL = $ DOC-> URL; $ url = ~ s / my.foo.com / my.bar.org /; $ DOC-> URL ($ URL); } sub content_filter {my $ doc = shift; ³» $ buf = $ doc-> ÄÜÅÙÃ÷; $ buf = ~ s / foo / bar / gi; $ DOC-> ÄÜÅÙÃ÷ ($ BUF); } 1; swish :: prog :: docÀº swish :: prog ÇÁ·¹ÀÓ ¿öÅ©ÀÇ doc °³Ã¼ÀÇ ±âº» Ŭ·¡½ºÀÔ´Ï´Ù. DOC °³Ã¼´Â Swish :: Prog-> Fetch () ¸Þ¼µå°¡ »ý¼ºÇÏ¿© ¹ÝȯµË´Ï´Ù. Swish :: Prog :: Doc ¹× add _filter () ¸Þ¼µå¸¦ Ãß°¡ÇÏ¿© °¡Á® ¿À±â Àü¿¡ DOC °³Ã¼ÀÇ °ªÀ» º¯°æÇϽʽÿÀ ( ). subclass swish :: prog, ÀÚ¸® Ç¥½Ã ÀÚ. example ¸¸ ÇØ´çÇÏ´õ¶óµµ swish :: prog :: docÀ» ÇÏÀ§ Ŭ·¡½º :: prog : package myApp :: prog; ±âº» QW (Swish :: Prog)¸¦ »ç¿ëÇϽʽÿÀ. SUB OK {MY $ self = shift; ³» $ doc = shift; 1; # ¸ðµç °ÍÀÌ Çã¿ëµË´Ï´Ù (±×·¯³ª ¸ðµç °ÍÀÌ ¼öÀͼºÀÌ ¾Æ´Õ´Ï´Ù ...)} 1; ÆÐÅ°Áö MyApp :: Prog :: Doc; # À§¿Í µ¿ÀÏÇÑ ±âº» Ŭ·¡½º À̸§À» »ç¿ëÇؾßÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
Swish :: Prog :: Doc. °ü·Ã ¼ÒÇÁÆ®¿þ¾î