GIGO. An IO::File object is not a valid argument. "Only" the following are acceptable:
- A file name
- A file handle
- A directory name
- A directory handle
- A typeglob reference
- A piped shell command. eq '| ls -al'
- A socket domain/port. eg 'perl.com:5678'
- '-' means STDIN or STDOUT (depending on usage)
- '=' means STDERR
- '$' means an IO::String object
- '?' means a temporary file
- A URI including: http, https, ftp and mailto
- An IO::All object
Update: Then again, passing *G or \*G doesn't work either. And neither does io->handle($h). And it's not specific to Windows.
Looks like a bug.