How do I chdir in an exec?

Alex Vandiver alexmv at MIT.EDU
Mon Mar 9 21:39:53 GMT 2009


On Mon, 2009-03-09 at 20:24 +0000, Andy Armstrong wrote:
> 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

Implemented as r1299 -- you can now also return a string containing raw
TAP, if you prefer.
 - Alex

-- 
Networking -- only one letter away from not working



More information about the tapx-dev mailing list