[cgiapp] Re: bizarre TAP::Parser behavior
fREW Schmidt
frioux at gmail.com
Wed Jul 15 06:44:22 EDT 2009
On Mon, May 4, 2009 at 9:17 PM, fREW Schmidt <frioux at gmail.com> wrote:
>
> On Mon, May 4, 2009 at 5:26 AM, Andy Armstrong <andy at hexten.net> wrote:
>
>> On 4 May 2009, at 05:21, fREW Schmidt wrote:
>> > I have written a small module that will turn TAP into color coded
>> > html. It seems to work fine when I run it from a special standalone
>> > service, but if I run it directly inside of a CGI::Application
>> > controller the output never actually gets parsed. It's extremely
>> > strange: if I run the TAP somehow ends up being the output of
>> > running some apache related binary (it outputs a bunch of help on
>> > what switches to use etc.)
>>
>> Can we see that output please?
>>
>
> Ok, here's the output from CAS:
>
> FrewSchmidt2 [10185] ~/personal/web_critic % perl
> ../web_test/bin/webserver.pl
> CGI::Application::Server: You can connect to your server at
> http://localhost:5052/
> 1..5
> ok 1 - use WebTest::Tester;
> ok 2 - didn't pass directory into constructor
> ok 3 - new() works
> ok 4 - get_directory() works
> not ok 5 - should find errors in test file
> # Failed test 'should find errors in test file'
> # at /home/frew/personal/web_test/t/critic.t line 24.
> # Structures begin differing at:
> # $got = ''
> # $expected = ARRAY(0x8ebaec0)
> # Looks like you failed 1 test of 5.
> 1..1
> ok 1 - hello_world should have a sane result
>
> And then the following gets put in the apache error log:
>
> # Usage: apache2 [-D name] [-d directory] [-f file]
> # [-C "directive"] [-c "directive"]
> # [-k start|restart|graceful|graceful-stop|stop]
> # [-v] [-V] [-h] [-l] [-L] [-t] [-S] [-X]
> # Options:
> # -D name : define a name for use in <IfDefine name>
> directives
> # -d directory : specify an alternate initial ServerRoot
> # -f file : specify an alternate ServerConfigFile
> # -C "directive" : process directive before reading config files
> # -c "directive" : process directive after reading config files
> # -e level : show startup errors of level (see LogLevel)
> # -E file : log startup errors to file
> # -v : show version number
> # -V : show compile settings
> # -h : list available command line options (this page)
> # -l : list compiled in modules
> # -L : list available configuration directives
> # -t -D DUMP_VHOSTS : show parsed settings (currently only vhost
> settings)
> # -S : a synonym for -t -D DUMP_VHOSTS
> # -t -D DUMP_MODULES : show all loaded modules
> # -M : a synonym for -t -D DUMP_MODULES
> # -t : run syntax check for config files
> # -X : debug mode (only one worker, do not detach)
>
> Any ideas?
I don't know what caused this but I solved it by replacing:
my $parser = TAP::Parser->new( { source => $source } );
with:
my $tap_output = qx{perl $file 2>&1};
my $parser = TAP::Parser->new( { tap => $tap_output } );
Anyway, whatever. It works now! Have a nice day!
--
fREW Schmidt
http://blog.afoolishmanifesto.com
-------------- next part --------------
_______________________________________________
tapx-dev mailing list
tapx-dev at hexten.net
http://www.hexten.net/mailman/listinfo/tapx-dev
cpan: http://search.cpan.org/dist/TAP-Parser/
bugs: http://rt.cpan.org/Public/Dist/Display.html?Name=TAP-Parser
More information about the cgiapp
mailing list