Re: [PATCHv5 06/17] gitweb/lib - Simple select(FH) based output capture
- From
Thomas Adam <thomas@xteddy.org>
- Date
- Oct 6, 2010, 22:52 UTC
- Message-ID
- <AANLkTinO+wo8z_peiDragtZ1Y8rJZ1UziMXh2YqSJaLD@mail.gmail.com>
- In-Reply-To
- <1286402526-13143-7-git-send-email-jnareb@gmail.com>
Hi --
On 6 October 2010 23:01, Jakub Narebski <jnareb@gmail.com> wrote:
Show 5 quoted lines
> +sub capture {
> + my ($self, $code) = @_;
> +
> + $self->start();
> + $code->();unless( defined $code and $code eq 'CODE' )
{
# Error?
....
}Show 5 quoted lines
> + return $self->stop();
> +}
> +
> +# Wrap caching data; capture only STDOUT
> +sub capture_block (&) {This is prototyped deliberately?
-- Thomas Adam