Tobiwan has asked for the wisdom of the Perl Monks concerning the following question:
I've a Problem with my own CPAN-Module. One of the CPAN-Tests failed (http://www.nntp.perl.org/group/perl.cpan.testers/2007/05/msg495843.html)
The test which this error causes is line 51:The $test->init() allways warns (via Carp::carp()) so it can't be that there is no warning. I think, it's the reconnect of STDERR to catch all warnings into the lexical variable $w.45 my $w = ''; 46 is(close(STDERR), 1, 'close STDERR'); 47 is(open(STDERR, ">", \$w), 1, 'reopen STDERR'); 48 49 50 is($test->init( abc => 1), 0, 'init with unknown parameters'); 51 is(length($w) > 0, 1, 'warnings after failed init');
Is there a known error with this behavior in perl 5.6? Or is there an error in my catch-STDERR-code? All other CPAN-tests are passed, so I think that the code is correct.
Any wisdoms about it?
__END__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catch STDERR in variables via open() failed?
by shmem (Chancellor) on May 27, 2007 at 10:18 UTC | |
|
Re: Catch STDERR in variables via open() failed?
by RMGir (Prior) on May 27, 2007 at 09:33 UTC | |
|
Re: Catch STDERR in variables via open() failed?
by jettero (Monsignor) on May 27, 2007 at 11:58 UTC |