Subject: | please add capturing of return values (with patch) |
A while ago i asked you to pull this branch:
http://github.com/wchristian/capture-tiny/commits/capture_return
On your request in IRC i am reporting this here as well. As follows was
our discussion on that.
wchristian said about 1 month ago:
Show quoted text
dagolden said about 1 month ago:
Show quoted text
>>
>> Recently I've been using your excellent module to test quite a few
>> legacy scripts in this manner:
>>
>> my $res;
>> my ( $stdout, $stderr ) = capture {
>> $res = system( 'perl script.pl' );
>> };
>>
>> While usable, i found it a bit cumbersome and found myself wanting
>> to do this instead:
>>
>> my ( $stdout, $stderr, @ret_vals ) = capture { system( 'perl
>> script.pl' ) };
>>
>> The changes in the capture_return branch of my fork enable exactly
>> that behavior and come with tests and updated documentation, so, if
>> you think this is a good idea, it would be a minimum of work for
>> you to release this.
>
> That seems pretty sensible and very useful. Let me look at your code
> and think about any broader implications. I've gotten a couple other
> feature requests and want to make sure they play well together.
> Thank you very much for taking the time to work on Capture::Tiny. I
> might have some time tonight to review your branch or else it will
> have to happen some time early next week.