Subject: | Net::OpenSSH remove _check_is_system_fh requirement |
Date: | Fri, 08 Jan 2010 11:22:39 -0800 |
To: | bug-Net-OpenSSH [...] rt.cpan.org |
From: | Geoff Horne <horne [...] infoblox.com> |
i'm trying to use scp_put(), and if there is a permission error on the
remote side the error goes to STDERR.
i want to capture that error, or at least suppress it since this is running
inside a CGI/mod_perl all.
perl 5.8 lets you redirect filehandles to a variable thus :
open(STDERR, '>', \$errstring);
but fileno() doesn't return a valid numnber :
(Filehandles connected to memory objects via new features of
"open" may return undefined even though they are open.)
so i'm stuck, the only workaround is to redirect the output to /dev/null