Plack :: Çڵ鷯 :: CLI.

PSGI ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ ¸í·É ÁÙ ÀÎÅÍÆäÀ̽º
Áö±Ý ´Ù¿î·Îµå

Plack :: Çڵ鷯 :: CLI. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °Ô½ÃÀÚ À̸§:
  • Goro Fuji
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~gfuji/

Plack :: Çڵ鷯 :: CLI. ű×


Plack :: Çڵ鷯 :: CLI. ¼³¸í

PSGI ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ ¸í·É ÁÙ ÀÎÅÍÆäÀ̽º Plack :: Handler :: CLI´Â PSGI ÀÀ¿ë ÇÁ·Î±×·¥À»À§ÇÑ ¸í·É ÁÙ ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÏ´Â PSGI Çڵ鷯ÀÔ´Ï´Ù .Synopsis #! Perl -w # PSGI / CLI¿¡ ´ëÇÑ CAT (1) ±¸ÇöÀº ¾ö°ÝÇÕ´Ï´Ù. Plack :: Handler :: CLI; URI :: Escape QW (URI_Unescape); SUB ERR {my (@msg) = @_; ¹Ýȯ ; } Sub Main {My ($ env) = @_; my @files = split '/', $ env -> {path_info}; ·ÎÄà $ /; ³» @Contents; if (@files) {foreach my $ file (@Files) {My $ f = uri_unescape ($ ÆÄÀÏ); ³» $ FH, '<' $ f ¶Ç´Â return err ( "$ f ' ¿­ ¼ö ¾ø½À´Ï´Ù : $! \ n"); Ǫ½Ã @contents readline ($ fh); }} else {push @ contents readline ($ env-> {psgi.input '}); } ¸¦ ¹ÝȯÇÕ´Ï´Ù. } My $ Handler = Plack :: Handler :: CLI-> New (Need_Headers => 0); $ handler-> ½ÇÇà (\ main); ¿ä±¸ »çÇ× : ¡¤ Perl.


Plack :: Çڵ鷯 :: CLI. °ü·Ã ¼ÒÇÁÆ®¿þ¾î