| Proc :: Hevy. µ¿ ±âÀûÀ¸·Î ÇÁ·Î¼¼½º ½ÇÇàÀ»À§ÇÑ Çìºñ±Þ ¸ðµâ |
Áö±Ý ´Ù¿î·Îµå |
Proc :: Hevy. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~pravus/
Proc :: Hevy. ű×
Proc :: Hevy. ¼³¸í
µ¿±â½ÄÀ¸·Î 󸮸¦À§ÇÑ Çìºñ±Þ ¸ðµâ Proc :: Hevy´Â µ¿±â½Ä ¹æ½ÄÀ¸·Î ÇÏÀ§ ÇÁ·Î¼¼½º¸¦ »êÃâÇϱâÀ§ÇÑ ´Ü¼øÇÑ Perl ¸ðµâÀÔ´Ï´Ù. ÇÁ·Î¼¼½ºÀÇ stdin¿¡ µ¥ÀÌÅ͸¦ Àü´ÞÇÏ´Â °£´ÜÇÑ ÀÎÅÍÆäÀ̽º¸¦ Á¦°øÇÏ¸é¼ STDOUT ¹× Stderr Output ¹öÆÛ¸µÀ»À§ÇÑ ¿©·¯ °¡Áö ¹æ¹ýÀ» Á¦°øÇÕ´Ï´Ù. Synopsis´Â Proc :: Hevy¸¦ »ç¿ëÇÕ´Ï´Ù. {MY $ status = proc :: hevy-> exec (command => 'cat', stdin => "cat \ n", stdout => \ my $ stdout, stderr => \ my $ stderr, stder => \ my $ stderr); } {My $ status => proc :: hevy-> exec (command => , stdin => , stdout => my $ stdout = [], stderr => My $ stderr = [],); } {my @stdin = qw (foo bar baz); my (@stdout, @stderr); MY $ status => proc :: hevy-> exec (command => sub {while (while () {my ($ fh, $ prefix) = $. % 2 == 0? (\ * stdout, '½ÉÁö¾î') : ( \ * stderr, 'Ȧ¼ö'); {$ fh} "$ fl}"$ prefix :: $ _ ";}}, stdin => sub {shift @stdin}, stdout => sub {push @stdout, $ _ }, stderr => sub {push @stderr, $ _ },); } {sub cat {my (@Files) = @_; exec cat => '-', @files} My $ status => proc :: hevy-> exec (command => , stdin => \ * stdin, stdout => \ stderr, stderr => \ stdout,); } {# Á¤¸» ¾µ¸ð¾ø´Â Cat My $ status = proc :: hevy-> exec (command => cat / dev / null 2> / dev / null); } ¿ä±¸ »çÇ× : ¡¤ Perl.
Proc :: Hevy. °ü·Ã ¼ÒÇÁÆ®¿þ¾î