X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=blobdiff_plain;f=lib%2FTest%2FValgrind%2FAction%2FCaptor.pm;h=b35409717ef9095f0556c2503ff7e4c2bb1efdd9;hp=ad9dfbca65dc2e8bdb44c0f913804cc5216f6532;hb=d83358595540f8645467c2d1a2f658fa74b14c72;hpb=254ae9b36d4bdcc79ab4a2dacd3d717b5cea1f9e diff --git a/lib/Test/Valgrind/Action/Captor.pm b/lib/Test/Valgrind/Action/Captor.pm index ad9dfbc..b354097 100644 --- a/lib/Test/Valgrind/Action/Captor.pm +++ b/lib/Test/Valgrind/Action/Captor.pm @@ -50,7 +50,10 @@ sub _dup_fh { or $_[0]->_croak('open(' . fileno($_[1]) . ", '$_[2]&', $fd): $!"); } -=head2 C +=head2 C + + $tva->save_fh($from, $mode); + $tva->save_fh($from, $mode, $to); Save the original filehandle C<$from> opened with mode C<$mode>, and redirect it to C<$to> if it's defined or to F otherwise. @@ -78,6 +81,8 @@ sub save_fh { =head2 C + $tva->restore_all_fh; + Restore all the filehandles that were saved with L to their original state. The redirections aren't closed.