Drogo.°æ·® À¥ ÇÁ·¹ÀÓ ¿öÅ© | |
Áö±Ý ´Ù¿î·Îµå |
Drogo. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Perl Artistic License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Ohio-Pennsylvania Software, LLC
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~mjflick/
Drogo. ű×
Drogo. ¼³¸í
DROGO´Â °æ·® Perl À¥ ÇÁ·¹ÀÓ ¿öÅ©ÀÔ´Ï´Ù. SynopSiskick-Start ÇÁ·ÎÁ§Æ® : Drogo --create = opp.psgi : DROGO :: SERVER :: PSGI; ¿¹ :: ¾Û »ç¿ë; MY $ APP = SUB {MY $ ENV = SHIFT; ¸®ÅÏ ÇÏÀ§ {³» $ ÀÀ´ä = À̵¿; # »õ ¼¹ö °³Ã¼ ¸¸µé±â My $ Server = DROGO :: SERVER :: PSGI-> NEW (env => $ env, ÀÀ´ä => $ ÀÀ´ä); ¿¹ :: App-> Çڵ鷯 (¼¹ö => $ ¼¹ö); }}; ¿¹ / app.pm : ÆÐÅ°Áö ¿¹ :: ¾Û; ¾ö°ÝÇÑ »ç¿ë; DROGO :: Dispatch (auto_import => 1)¸¦ »ç¿ëÇϽʽÿÀ. ÇÏÀ§ init {³» $ self = shift; $ self -> {foo} = 'bar'; } ÇÏÀ§ ±âº» : »öÀÎ {³» $ self = shift; # $ self-> rÀº °øÀ¯ ÀÀ´ä / requet ¿ÀºêÁ§Æ® # $ self-> request / req ¿äû ¿ÀºêÁ§Æ® # $ self-> ÀÀ´ä / res°¡ ÀÀ´ä °´Ã¼ # $ self-> dispatcher¸¦ ¹ÝȯÇÕ´Ï´Ù drogo object # $ self- > ¼¹ö´Â ¼¹ö ¿ÀºêÁ§Æ® $ self-> r-> header ( 'text / html'); # ±âº»°ª $ self-> R-> »óÅ (200); # Defaults to 200 Anyways $ self-> r-> Àμâ ( 'ȯ¿µ!'); $ self-> r-> Àμâ (Q ); $ self-> r-> ºÐ¸®; # ÀÌÁ¦ µð½ºÆÐÄ¡¸¦ ÁßÁöÇÏ°í Á¾·á} # / foo sub foo : ¾×¼Ç {³» $ self = shift; ³» $ stuff = $ self-> r-> param ( 'templess); $ self-> r-> Àμâ ( 'Howdy!'); } sub stream_this : µ¿ÀÛ {My $ self = shift; # dispatcher $ self-> dispatcher-> dispatching (0); $ self-> server-> header_out ( 'etag'=> 'fakeetag'); $ self-> server-> header_out ( 'cache-control'=> 'public, max-age = 31536000'); $ self-> server-> send_http_header ( 'text / html'); $ self-> server-> Àμâ ( 'Á÷Á¢ ½ºÆ®¸®¹Ö'); } # / moo / ¹¹µç°£¿¡ ÂüÁ¶ : ActionMatch {My $ self = shift; my @args = $ self-> r-> ÀÏÄ¡; $ self-> r-> Àμâ ( 'Howdy :'. $ args ); } # / Å· / ¹¹µçÁö ¾ð±Þ / ¹ì / ¹ì / ¹¹µçÁö ÇÏÀ§ ºñ¹ö : ActionRegex ( 'king /(.* ¹ì / (year /(.*)') {³ªÀÇ $ self = shift; ³» @args = $ self-> ÀÏÄ¡; $ self-> r-> Àμâ ( "ROAR : $ args , $ args "); }} Á¦Ç°ÀÇ È¨ÆäÀÌÁö
Drogo. °ü·Ã ¼ÒÇÁÆ®¿þ¾î