<html><body>Yes :) in plackup it working :) <br>Super thank you<br><br><br><p>---------- Původní zpráva ----------<br>Od: David Golden &lt;xdg@xdg.me&gt;<br>Datum: 13. 2. 2013<br>Předmět: Re: [dancer-users] Capture or redirect STDOUT</p><br><blockquote>Are you running this with the default server?  IIRC, it has issues<br>with the standard handles.<br><br>Try with Starman:<br><br>  $ plackup --server Starman myapp.pl<br><br>On Wed, Feb 13, 2013 at 11:59 AM,  &lt;igor.bujna@post.cz&gt; wrote:<br>&gt; Hi,<br>&gt; i want to capture STDOUT under my Dancer applications with package<br>&gt; Capture::Tiny. I have this simple Perl test:<br>&gt;<br>&gt; --------------------------------------------------------------------------------------------------------<br>&gt; use Capture::Tiny;<br>&gt; my ($stdout, $stderr, $exit) = Capture::Tiny::capture {<br>&gt;         system( "echo 'OK'");<br>&gt; };<br>&gt; print STDERR "Captured:$stdout\n";<br>&gt; --------------------------------------------------------------------------------------------------------<br>&gt;<br>&gt; Capturing STDOUT in this script is ok, but when i move to Dancer app, that<br>&gt; this faill. System print command to STDERR and nothing is captured.<br>&gt;<br>&gt; --------------------------------------------------------------------------------------------------------<br>&gt; package Test;<br>&gt; use Dancer ':syntax';<br>&gt; use Capture::Tiny;<br>&gt;<br>&gt; our $VERSION = '0.1';<br>&gt;<br>&gt; get '/' =&gt; sub {<br>&gt;    my ($stdout, $stderr, $exit) = Capture::Tiny::capture {<br>&gt;         system( "echo 'OK'");<br>&gt;    };<br>&gt;    print STDERR "Captired:$stdout\n";<br>&gt;     template 'index';<br>&gt; };<br>&gt; true;<br>&gt; --------------------------------------------------------------------------------------------------------<br>&gt;<br>&gt; Why or where system/fork redirect STDOUT to STDERR ? How can I capture this<br>&gt; under dancer. Maybe it will be possible to change system() call to own<br>&gt; function, where can use IPC::Open3, but how can i made it?<br>&gt;<br>&gt; Thank you for yours suggestion Igor<br>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; dancer-users mailing list<br>&gt; dancer-users@dancer.pm<br>&gt; http://lists.preshweb.co.uk/mailman/listinfo/dancer-users<br>&gt;<br><br><br><br>-- <br>David Golden &lt;xdg@xdg.me&gt;<br>Take back your inbox! → http://www.bunchmail.com/<br>Twitter/IRC: @xdg<br>_______________________________________________<br>dancer-users mailing list<br>dancer-users@dancer.pm<br>http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</blockquote></body></html>