if (num_svs) {
/* New style explict name, type is just mode and discipline/layer info */
STRLEN l = 0;
+#ifdef USE_STDIO
+ if (SvROK(*svp) && !strchr(name,'&')) {
+ if (ckWARN(WARN_IO))
+ Perl_warner(aTHX_ packWARN(WARN_IO),
+ "Can't open a reference");
+ SETERRNO(EINVAL, LIB$_INVARG);
+ goto say_false;
+ }
+#endif /* USE_STDIO */
name = SvOK(*svp) ? SvPV(*svp, l) : "";
len = (I32)l;
name = savepvn(name, len);
is because you don't have read permission for a file which you named on
the command line.
+=item Can't open a reference
+
+(W io) You tried to open a scalar reference for reading or writing,
+using the 3-arg open() syntax :
+
+ open FH, '>', $ref;
+
+but your version of perl is compiled without perlio, and this form of
+open is not supported.
+
=item Can't open bidirectional pipe
(W pipe) You tried to say C<open(CMD, "|cmd|")>, which is not supported.
$a = eof STDOUT ;
EXPECT
Filehandle STDOUT opened only for output at - line 3.
+########
+# doio.c [Perl_do_openn]
+use Config;
+BEGIN {
+ if ($Config{useperlio}) {
+ print <<EOM;
+SKIPPED
+# warns only without perlio
+EOM
+ exit;
+ }
+}
+use warnings 'io';
+my $x = "foo";
+open FOO, '>', \$x;
+no warnings 'io';
+open FOO, '>', \$x;
+EXPECT
+Can't open a reference at - line 14.