Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Capture-Tiny CPAN distribution.

Report information
The Basics
Id: 54630
Status: resolved
Priority: 0/
Queue: Capture-Tiny

People
Owner: Nobody in particular
Requestors: ambs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.07
Fixed in: (no value)



Subject: Not capturing Test::More output (and others)
Hello. I am trying to capture the STDERR generated by a C library that is glued (XS code) to a Perl module. While debugging that (not working yet) I found out that Capture::Tiny is not capturing the output (no idea if stdout or stderr) of Test::More. I do not know if this is related to my problem. But who knows if a fix for this issue maybe fixes my problem :P In attach a simple test code. Cheers ambs
Subject: capture.pl
#!/usr/bin/perl use strict; use warnings; use Capture::Tiny qw/capture/; use Test::More tests => 1; my ($sout, $serr); ($sout,$serr) = capture { ok(1); }; print "Got: [$sout][$serr]\n";
Subject: Re: [rt.cpan.org #54630] Not capturing Test::More output (and others)
Date: Mon, 15 Feb 2010 13:34:09 -0500
To: bug-Capture-Tiny [...] rt.cpan.org
From: David Golden <xdaveg [...] gmail.com>
Test::More saves copies of STDOUT and STDERR handles for its output when it loads. Capture::Tiny acts on current handles only and doesn't affect the ones already saved. David On Feb 15, 2010 12:23 PM, "Alberto Simões via RT" < bug-Capture-Tiny@rt.cpan.org> wrote: Mon Feb 15 12:22:47 2010: Request 54630 was acted upon. Transaction: Ticket created by AMBS Queue: Capture-Tiny Subject: Not capturing Test::More output (and others) Broken in: 0.07 Severity: Important Owner: Nobody Requestors: ambs@cpan.org Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=54630 > Hello. I am trying to capture the STDERR generated by a C library that is glued (XS code) to a Perl module. While debugging that (not working yet) I found out that Capture::Tiny is not capturing the output (no idea if stdout or stderr) of Test::More. I do not know if this is related to my problem. But who knows if a fix for this issue maybe fixes my problem :P In attach a simple test code. Cheers ambs #!/usr/bin/perl use strict; use warnings; use Capture::Tiny qw/capture/; use Test::More tests => 1; my ($sout, $serr); ($sout,$serr) = capture { ok(1); }; print "Got: [$sout][$serr]\n";
On Mon Feb 15 13:35:18 2010, xdaveg@gmail.com wrote: Show quoted text
> Test::More saves copies of STDOUT and STDERR handles for its output
when it Show quoted text
> loads. Capture::Tiny acts on current handles only and doesn't affect the > ones already saved.
Then probably we can't do a thing and the better is to close this ticket :) Show quoted text
> > David > > On Feb 15, 2010 12:23 PM, "Alberto Simões via RT" < > bug-Capture-Tiny@rt.cpan.org> wrote: > > Mon Feb 15 12:22:47 2010: Request 54630 was acted upon. > Transaction: Ticket created by AMBS > Queue: Capture-Tiny > Subject: Not capturing Test::More output (and others) > Broken in: 0.07 > Severity: Important > Owner: Nobody > Requestors: ambs@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=54630 > > > > Hello. > > I am trying to capture the STDERR generated by a C library that is glued > (XS code) to a Perl module. > > While debugging that (not working yet) I found out that Capture::Tiny is > not capturing the output (no idea if stdout or stderr) of Test::More. > > I do not know if this is related to my problem. But who knows if a fix > for this issue maybe fixes my problem :P > > In attach a simple test code. > Cheers > ambs > > #!/usr/bin/perl > > use strict; > use warnings; > > use Capture::Tiny qw/capture/; > use Test::More tests => 1; > > my ($sout, $serr); > ($sout,$serr) = capture { > ok(1); > }; > > print "Got: [$sout][$serr]\n";