°æ·Î :: ¶ó¿ìÅÍ

¶ó¿ìÆà °æ·Î ¿ë µµ±¸
Áö±Ý ´Ù¿î·Îµå

°æ·Î :: ¶ó¿ìÅÍ ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Stevan Little
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~stevan/

°æ·Î :: ¶ó¿ìÅÍ Å±×


°æ·Î :: ¶ó¿ìÅÍ ¼³¸í

°æ·Î ¶ó¿ìÆà µµ±¸ Path :: Router´Â °æ·Î ¶ó¿ìÆÃÀ»À§ÇÑ µµ±¸ÀÔ´Ï´Ù. Synopsis My $ Router = Path :: Router-> New; $ ROUTER-> add_route ( 'blog'=> (defaults => {Controller => 'blog', action => '»öÀÎ',}, # °íÁ¤ µÈ "´ë»ó"#À» ÀÏÄ¡½Ãų ¼ö ÀÖ½À´Ï´Ù. # ´ë»óÀ̵DZ⸦ ¿øÇÏ´Â °Í # target => my :: app-> get_controller ( 'ºí·Î±×') -> get_action ( '»öÀÎ'))); $ ROUTER-> add_route ( 'ºí·Î±× / : ³â / : ¿ù / : day'=> (defaults => coterther => 'blog', action => 'show_date',}, # À¯È¿¼º °Ë»ç ... À¯È¿¼º °Ë»ç => {# ... raw-regexp refs => qr / d {4} /, # ... ´ç½ÅÀÌ ¸¸µç ´ÞÄÞÇÑ ´Þ => ''NumericMonth ', # ... ¹«½º anon-subtypes ¸¸µç ÀζóÀÎ µ¥ÀÌ => ÇÏÀ§ À¯Çü »ý¼º ( 'int'=> {$ _ add_route ( 'blog / : action /} : id'=> (defaults => {controller => 'blog',}, validations => {action => qr / d + /) id => 'int', # ÀÏ¹Ý ¹«½º À¯Çüµµ »ç¿ëÇÕ´Ï´Ù.})); Dispatcher #´Â °æ·Î :: ¶ó¿ìÅÍ :: °æ·Î :: ÀÏÄ¡ °³Ã¼ ³» $ match = $ router-> match ( ' / blog / edit / 15 '); Äڵ忡¼­ ³» $ uri = $ router-> uri_for (ÄÁÆ®·Ñ·¯ =>'ºí·Î±× ', µ¿ÀÛ =>'show_date ', year => 2006, month => 10, Day => 5,);ÀÌ ¸ðµâÀº ÆÄ°ß¿¡ ÀûÇÕÇÑ ¸Å°³ º¯¼ö·Î °æ·Î¸¦ ÇØüÇÏ´Â ¹æ¹ýÀ» Á¦°øÇÕ´Ï´Ù. ¶ÇÇÑ ¸Å°³ º¯¼ö ¸ñ·ÏÀ» ÃëÇÏ¿© ÀûÀýÇÑ URI¸¦ ±¸¼º ÇÒ ¼öÀÖ´Â ¿ªÇÒÀ» Á¦°øÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¿ä±¸ »çÇ× : ¡¤ Perl.


°æ·Î :: ¶ó¿ìÅÍ °ü·Ã ¼ÒÇÁÆ®¿þ¾î

message.pm.

¸Þ½ÃÁöÀÇ Çؽø¦ Á¤ÀÇÇÏ°í Çì´õ, ¾Ë¸², °æ°í ¶Ç´Â ¿¡¸¯À¸·Î ½Äº°ÇÕ´Ï´Ù. ...

207

´Ù¿î·Îµå