goto say_false;
}
#endif /* USE_STDIO */
- name = SvOK(*svp) ? savesvpv (*svp) : savepvs ("");
+ name = (SvOK(*svp) || SvGMAGICAL(*svp)) ?
+ savesvpv (*svp) : savepvs ("");
SAVEFREEPV(name);
}
else {
use warnings;
use Config;
-plan tests => 108;
+plan tests => 109;
my $Perl = which_perl();
eval { open $99, "foo" };
like($@, qr/Modification of a read-only value attempted/, "readonly fh");
+
+# [perl#73626] mg_get wasn't run on the pipe arg
+
+{
+ package p73626;
+ sub TIESCALAR { bless {} }
+ sub FETCH { "$Perl -e 1"}
+
+ tie my $p, 'p73626';
+
+ package main;
+
+ ok( open(my $f, '-|', $p), 'open -| magic');
+}