Apache :: Request :: Dispatcher.

Apache :: Request :: Dispatcher Perl ¸ðµâÀº Apache :: Request :: ControllerÀÇ ÇÏÀ§ Ŭ·¡½º¿¡ ¿äûÀ» Àü´ÞÇÕ´Ï´Ù.
Áö±Ý ´Ù¿î·Îµå

Apache :: Request :: Dispatcher. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Bradley Kite
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~kite/gestalt-0.2.1/Dispatcher/Dispatcher.pm

Apache :: Request :: Dispatcher. ű×


Apache :: Request :: Dispatcher. ¼³¸í

Apache :: Request :: Dispatcher Perl ¸ðµâÀº Apache :: Request :: ControllerÀÇ ÇÏÀ§ Ŭ·¡½º¿¡ ¿äûÀ» ¿äûÇÕ´Ï´Ù. apache :: request :: Dispatcher Perl ¸ðµâÀº ApacheÀÇ ÇÏÀ§ Ŭ·¡½º¿¡ ¿äûÀ» Àü´ÞÇÕ´Ï´Ù. Apache :: Request :: Controller.synopsis SetHandler Perl-Script PerlHander Apache :: Request :: Dispatcher SetEnv DispatcherConf / Path / to / file.cfg setenv app_name myApplication apache :: request :: dispatcher´Â mod_perl¿¡¼­ apache http ¿äûÀ» ó¸®ÇÏ°í apache :: request :: Controller (ÀϺΠÃʱ⠿äû ÈÄ)ÀÇ ÇÏÀ§ Ŭ·¡½º·Î Àü´ÞÇÏ´Â mod_perl Çڵ鷯ÀÔ´Ï´Ù. ¼³Ä¡°¡ ¼öÇàµÇ¾ú½À´Ï´Ù.) .IF Çʼö À̹ǷÎÀÌ ¿äû¿¡ ´ëÇÑ DBI¸¦ »ç¿ëÇÏ¿© DBI¸¦ »ç¿ëÇÏ¿© µ¥ÀÌÅͺ£À̽º¿¡ ´ëÇÑ ¿¬°áÀ» ¼³Á¤ÇÕ´Ï´Ù (Apache :: Session)ÀÌ ¿äû¿¡ ´ëÇÑ ¼¼¼Ç µ¥ÀÌÅ͸¦ °Ë»öÇϰųª ±×·± ´ÙÀ½ ¿äûÀÌ °ÅºÎµË´Ï´Ù. ±×·± ´ÙÀ½ Dispatcher´Â ¸ðµâ À̸§¿¡¼­ µ¿ÀûÀ¸·Î »ó¼Ó ÇÑ ´ÙÀ½ $ self-> action ()À» È£ÃâÇÕ´Ï´Ù. ÄÁÆ®·Ñ·¯ÀÇ Action () ¸Þ¼­µå´Â °´Ã¼ ÁöÇâ ¹æ½ÄÀ¸·Î È£ÃâµË´Ï´Ù. ù ¹ø° ¸Å°³ º¯¼ö·Î Àü´Þ µÈ Dispatcher °´Ã¼°¡ Àü´ÞµÇ¾ú½À´Ï´Ù.ÀÌ °´Ã¼´Â ´ÙÀ½ Çؽà ¿ä¼Ò¸¦ Æ÷ÇÔÇÕ´Ï´Ù. request => $ r, # apache ¿äû ¿ÀºêÁ§Æ® dbh => $ dbh, # database connection object cfg => $ cfg, # appconfig °´Ã¼ ÅÛÇø´ => $ template, # ÅÛÇø´ ÇÁ·Î¼¼¼­ apr => $ q, # cgi / libapreq object session => % session # ±¸¼º ÆÄÀÏ¿¡ ´ëÇÑÀÌ userDependingÀÇ ¼¼¼Ç µ¥ÀÌÅÍ, 'dbh' ¶Ç´Â '¼¼¼Ç'ÀÌ ²¨Á® ÀÖÀ¸¸é Á¤ÀǵÇÁö ¾ÊÀ» ¼ö ÀÖ½À´Ï´Ù. ¿¹Á¦ ÄÁÆ®·Ñ·¯ ¸Þ¼Òµå´Â ´ÙÀ½°ú °°ÀÌ ÀÛ¼º µÉ ¼ö ÀÖ½À´Ï´Ù. ÆÐÅ°Áö Apache :: Request :: Controller :: SubClass; @isa = qw (Apache :: Request :: Controller); ¾ö°ÝÇÑ »ç¿ë; apache :: const qw (°øÅë : ¸Þ¼Òµå : http)¸¦ »ç¿ëÇϽʽÿÀ. ÇÏÀ§ µ¿ÀÛ {³» $ self = shift; My $ Gess = GetThingById ($ self-> { 'dbh'}, $ self-> { 'apr'} -> param ( 'the'disid ')); $ self-> { '¿äû'} -> »óÅ (http_ok); $ self-> { '¿äû'} -> content_type ( 'text / html'); $ self-> { 'template'} -> ÇÁ·Î¼¼½º ( 'myTemplate', {thing => $ teing}); return ok; } 1; ¿ä±¸ »çÇ× : ¡¤ Perl.


Apache :: Request :: Dispatcher. °ü·Ã ¼ÒÇÁÆ®¿þ¾î