How do I chdir in an exec?

Andy Armstrong andy at hexten.net
Mon Mar 9 20:24:11 GMT 2009


On 9 Mar 2009, at 20:14, Michael G Schwern wrote:
> Here's one to read URLs out of the test files and fetch the test  
> results from
> the web.
>
> exec => sub {
>    my($harness, $file) = @_;
>
>    open my $fh, $file or die $!;
>    my $url = <$fh>;
>    chomp $url;
>
>    # get_url() being some function that returns a filehandle to
>    # a web get
>    my $web_fh = get_url($url);
>    return $web_fh;
> }

+1

> It would be nice to expose more TAP::Parser::Source::Perl methods.
> Particularly those which generate a command to run and also the code  
> which
> runs it.  I found that the code to scan #! for taint is available,  
> but not the
> rest.  This would allow one to reproduce some of what
> TAP::Parser::Source::Perl does without reinventing too much of the  
> wheel.

+1

-- 
Andy Armstrong, Hexten



More information about the tapx-dev mailing list