- or download this
use strict; use warnings;
BEGIN { require Capture::Tiny; }
my $out = Capture::Tiny::capture { print "STDOUT output to capture"; }
+;
print "Captured STDOUT: [" . ( defined $out ? $out : 'undef' ) ."]\n";
- or download this
Captured STDOUT: [STDOUT output to capture]
- or download this
use strict; use warnings;
require Capture::Tiny;
my $out = Capture::Tiny::capture { print "STDOUT output to capture"; }
+;
print "Captured STDOUT: [" . ( defined $out ? $out : 'undef' ) ."]\n";
- or download this
Can't call method "Capture::Tiny::capture" without a package or object
+ reference at C:\@local\@projects\@tests\test-Capture-Tiny.pl line 5.