Subject: | File::Remote::open does not handle three+ argument open |
Note this is only an issue if one is replacing main::open. The rest of
this report assumes this has been done, in order to add remote
capability to an existing program without invasive changes.
File::Remote::open only looks at the first two main::open arguments. If
there are three or more arguments, it cannot possibly work.
Fortunately, it also is not looking at enough of the request to fail
catastrophically.
Also, any attempt to open a filehandle to read the output of a command
fails.
My recommended fix for this would be to check for three or more
arguments - if so, pass straight to CORE::open without further checking.
Also, if there's no method found, but the string ends with '|', pass to
CORE::open.
This still leaves issues with File::Remote::open not having the
extra-special prototype magic that CORE::open has, but I don't know if
that is fixable for older perls.