Re: [RFC/PATCH (WIP)] gitweb: Use Test::WWW::Mechanize::CGI to test gitweb output
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jun 15, 2008, 08:36 UTC
- Message-ID
- <200806151036.22205.jnareb@gmail.com>
- In-Reply-To
- <4854343B.40707@gmail.com>
Lea Wiemann wrote:
Show 9 quoted lines
> Jakub Narebski wrote: >> >> [*1*] it would be nice to have perl_application in WWW::Mechanize::CGI, >> which would simply setup %ENV and use do() instead of system() on >> provided application. > > Gitweb and probably CGI::Carp qw(fatalsToBrowser) use 'exit', so we'd > have to use Test::Trap (or so) to catch those. I think we should defer > this until performance actually becomes an issue.
The idea was more to avoid bug in cgi_application() method of WM::CGI, which fails on pathname containing embedded spaces (that is why workaround in setting $gitweb path, to avoid 'trash directory' in it), than for performance reasons.
Nevertheless naive $mech->cgi( sub { do "$gitweb"; } ); doesn't work; and after thinking about it a little it simply couldn't work...
-- Jakub Narebski Poland