This is necessary for Debian 7.x (wheezy), since
GLOB objects do not seem responsive to the can("fileno")
check (we do a similar check in GitHTTPBackend).
my $tmpfh;
my $fd;
if (my $ref = ref($msg)) {
my $tmpfh;
my $fd;
if (my $ref = ref($msg)) {
-
- return $msg->fileno if $ref ne 'SCALAR' && $msg->can('fileno');
+ my $fileno = eval { fileno($msg) };
+ return $fileno if defined $fileno;
$tmpfh = IO::File->new_tmpfile;
$tmpfh->autoflush(1);
$tmpfh = IO::File->new_tmpfile;
$tmpfh->autoflush(1);