<div class="gmail_quote">On Mon, May 4, 2009 at 9:17 PM, fREW Schmidt <span dir="ltr">&lt;<a href="mailto:frioux@gmail.com">frioux@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><div class="gmail_quote"><div class="im">On Mon, May 4, 2009 at 5:26 AM, Andy Armstrong <span dir="ltr">&lt;<a href="mailto:andy@hexten.net" target="_blank">andy@hexten.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>On 4 May 2009, at 05:21, fREW Schmidt wrote:<br>
&gt; I have written a small module that will turn TAP into color coded<br>
&gt; html.  It seems to work fine when I run it from a special standalone<br>
&gt; service, but if I run it directly inside of a CGI::Application<br>
&gt; controller the output never actually gets parsed.  It&#39;s extremely<br>
&gt; strange: if I run the TAP somehow ends up being the output of<br>
&gt; running some apache related binary (it outputs a bunch of help on<br>
&gt; what switches to use etc.)<br>
<br>
</div>Can we see that output please?<br>
<div></div></blockquote></div><div><br>Ok, here&#39;s the output from CAS:<br><br><span style="font-family: courier new,monospace;">FrewSchmidt2 [10185] ~/personal/web_critic % perl ../web_test/bin/webserver.pl </span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">CGI::Application::Server: You can connect to your server at <a href="http://localhost:5052/" target="_blank">http://localhost:5052/</a></span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">1..5</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ok 1 - use WebTest::Tester;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">ok 2 - didn&#39;t pass directory into constructor</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ok 3 - new() works</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">ok 4 - get_directory() works</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">not ok 5 - should find errors in test file</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   Failed test &#39;should find errors in test file&#39;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   at /home/frew/personal/web_test/t/critic.t line 24.</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#     Structures begin differing at:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#          $got = &#39;&#39;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#     $expected = ARRAY(0x8ebaec0)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># Looks like you failed 1 test of 5.</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">1..1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ok 1 - hello_world should have a sane result</span><br style="font-family: courier new,monospace;">

<br>And then the following gets put in the apache error log:<br><br><span style="font-family: courier new,monospace;"># Usage: apache2 [-D name] [-d directory] [-f file]</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#                [-C &quot;directive&quot;] [-c &quot;directive&quot;]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#                [-k start|restart|graceful|graceful-stop|stop]</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#                [-v] [-V] [-h] [-l] [-L] [-t] [-S] [-X]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># Options:</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -D name            : define a name for use in &lt;IfDefine name&gt; directives</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -d directory       : specify an alternate initial ServerRoot</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -f file            : specify an alternate ServerConfigFile</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -C &quot;directive&quot;     : process directive before reading config files</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -c &quot;directive&quot;     : process directive after reading config files</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -e level           : show startup errors of level (see LogLevel)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -E file            : log startup errors to file</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -v                 : show version number</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -V                 : show compile settings</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -h                 : list available command line options (this page)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -l                 : list compiled in modules</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -L                 : list available configuration directives</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -S                 : a synonym for -t -D DUMP_VHOSTS</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -t -D DUMP_MODULES : show all loaded modules </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -M                 : a synonym for -t -D DUMP_MODULES</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">#   -t                 : run syntax check for config files</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#   -X                 : debug mode (only one worker, do not detach)</span><br style="font-family: courier new,monospace;">

<br></div></div>Any ideas?</blockquote><div><br>I don&#39;t know what caused this but I solved it by replacing:<br><br>      my $parser = TAP::Parser-&gt;new( { source =&gt; $source } );<br><br>with:<br><br>      my $tap_output = qx{perl $file 2&gt;&amp;1};<br>
      my $parser = TAP::Parser-&gt;new( { tap =&gt; $tap_output } );<br><br>Anyway, whatever. It works now!  Have a nice day!  <br></div></div><br>-- <br>fREW Schmidt<br><a href="http://blog.afoolishmanifesto.com">http://blog.afoolishmanifesto.com</a><br>