in reply to STDOUT::Capture - manipulate STDOUT

You have a minor problem in PRINT which will only be an issue if someone tries to print an object that automagically stringifies.

You can fix this by replacing

my $input = join '', @_;
with

my $intput = join '', map { "$_" } @_;