IO::Capture::ExtendedIO::Capture::Extended is an extend functionality of IO::Capture. | |
Download |
IO::Capture::Extended Ranking & Summary
Advertisement
- License:
- GPL
- Price:
- FREE
- Publisher Name:
- James E Keenan
- Publisher web site:
- http://search.cpan.org/~particle/parrot-0.6.1/lib/Parrot/Pmc2c/Pmc2cMain.pm
IO::Capture::Extended Tags
IO::Capture::Extended Description
IO::Capture::Extended is an extend functionality of IO::Capture. IO::Capture::Extended is an extend functionality of IO::Capture.SYNOPSISThe programmer interface consists of two classes:IO::Capture::Stdout::Extended use IO::Capture::Stdout::Extended; $capture = IO::Capture::Stdout::Extended->new(); $capture->start(); # some code that prints to STDOUT $capture->stop(); # scalar context: return number of print statements with 'fox' $matches = $capture->grep_print_statements('fox'); # list context: return list of print statements with 'fox' @matches = $capture->grep_print_statements('fox'); # return number of print statements $matches = $capture->statements; # scalar context: return number of pattern matches $regex = qr/some regular expression/; $matches = $capture->matches($regex); # list context: return list of pattern matches @matches = $capture->matches($regex); # return reference to array holding list of pattern matches $matchesref = $capture->matches_ref($regex); # scalar context: return number of 'screen' lines printed $screen_lines = $capture->all_screen_lines(); # list context: return list of 'screen' lines printed @all_screen_lines = $capture->all_screen_lines();IO::Capture::Stderr::Extended $capture = IO::Capture::Stderr::Extended->new(); $capture->start(); # some code that prints to STDERR $capture->stop();... and then use all the methods defined above for IO::Capture::Stdout::Extended. Requirements: · Perl
IO::Capture::Extended Related Software