Skip Menu |

This queue is for tickets about the File-Remote CPAN distribution.

Report information
The Basics
Id: 118697
Status: new
Priority: 0/
Queue: File-Remote

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.17
Fixed in: (no value)



Subject: Does not work under "use strict"
The first SYNOPSIS example does not work if "use strict" is in effect: use strict; use File::Remote qw(:replace); # special :replace tag # read from a remote file open(REMOTE, "host:/remote/file") or die $!; print while (<REMOTE>); close(REMOTE); This is causing compilation errors (tried with perl 5.18.4 and 5.8.1): Bareword "REMOTE" not allowed while "strict subs" in use at ... Bareword "REMOTE" not allowed while "strict subs" in use at ... Execution of ... aborted due to compilation errors. Using a lexical filehandle also does not work: open(my $REMOTE, "host:/remote/file") or die $!; print while (<$REMOTE>); close($REMOTE); This is causing a runtime error: Bad usage of open(HANDLE, file) at ... Here's a variant which seems to work under "use strict": open(\*REMOTE, "host:/remote/file") or die $!; print while (<REMOTE>); close(\*REMOTE);