sub _is_writable { my $fh = shift; return eval { defined print { $fh } ''; }; }