Name
t/lib/IO::c55Capture - a wafer-thin test support package
Why!?
Compatibility with 5.5.3 and no external dependencies.
Usage
Works with a global filehandle:
# set a spool to write to
tie local *STDOUT, 'IO::c55Capture';
...
# clear and retrieve buffer list
my @spooled = tied(*STDOUT)->dump();
Or, a lexical (and autocreated) filehandle:
my $capture = IO::c55Capture->new_handle;
...
my @output = tied($$capture)->dump;
Note the '$$' dereference.