… | |
… | |
104 | |
104 | |
105 | $fh = delete $arg{fh}; |
105 | $fh = delete $arg{fh}; |
106 | |
106 | |
107 | if ($fh =~ /^\s*\d+\s*$/) { |
107 | if ($fh =~ /^\s*\d+\s*$/) { |
108 | $fd = $fh; |
108 | $fd = $fh; |
109 | $fh = AnyEvent::_dupfh $arg{poll}, $fh; |
109 | ($fh) = AnyEvent::_dupfh $arg{poll}, $fh; |
110 | } else { |
110 | } else { |
111 | defined eval { $fd = fileno $fh } |
111 | defined eval { $fd = fileno $fh } |
112 | or confess "AnyEvent->io called with illegal fh argument '$fh'"; |
112 | or confess "AnyEvent->io called with illegal fh argument '$fh'"; |
113 | } |
113 | } |
114 | |
114 | |