This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Oops. I broke sigtrap.t’s test output
authorFather Chrysostomos <sprout@cpan.org>
Fri, 24 Sep 2010 07:03:23 +0000 (00:03 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 24 Sep 2010 07:03:23 +0000 (00:03 -0700)
lib/sigtrap.t

index 13775f7..7e8ddef 100644 (file)
@@ -61,8 +61,10 @@ my $out = tie *STDOUT, 'TieOut';
 $SIG{FAKE} = 'DEFAULT';
 $sigtrap::Verbose = 1;
 sigtrap->import('any', 'FAKE');
+my $read = $out->read;
+untie *STDOUT;
 is( $SIG{FAKE}, \&sigtrap::handler_traceback, 'should set default handler' );
-like( $out->read, qr/^Installing handler/, 'does it talk with $Verbose set?' );
+like( $read, qr/^Installing handler/, 'does it talk with $Verbose set?' );
 
 # handler_die croaks with first argument
 eval { sigtrap::handler_die('FAKE') };