diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1999-05-07 21:24:50 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1999-05-07 21:24:50 +0000 |
commit | 853846ea710f8feaed8c98b358bdc8967dd522d2 (patch) | |
tree | b897c99fba920636ba7e2d962c8cf67880fd40d6 /pp_sys.c | |
parent | 7c1e0849686a4ea069f6fa2a095a70c337e62ace (diff) | |
download | perl-853846ea710f8feaed8c98b358bdc8967dd522d2.tar.gz |
Implement open( my $fh, ...) and similar.
Set flag in op.c for "constructor ops"
In pp_rv2gv, if flag is set and arg is PADSV and uninit
vivify as reference to a detached GV.
(Name of GV is the pad name.)
This scheme should "just work" for pipe/socket etc. too.
#if 0 out the open(FH,undef) for now.
Change t/io/open.t to test open(my $fh,...)
p4raw-id: //depot/perl@3326
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -506,6 +506,8 @@ PP(pp_open) DIE(PL_no_usym, "filehandle"); if (GvIOp(gv)) IoFLAGS(GvIOp(gv)) &= ~IOf_UNTAINT; + +#if 0 /* no undef means tmpfile() yet */ if (sv == &PL_sv_undef) { #ifdef PerlIO PerlIO *fp = PerlIO_tmpfile(); @@ -518,6 +520,8 @@ PP(pp_open) RETPUSHUNDEF; RETURN; } +#endif /* no undef means tmpfile() yet */ + tmps = SvPV(sv, len); if (do_open(gv, tmps, len, FALSE, O_RDONLY, 0, Nullfp)) PUSHi( (I32)PL_forkprocess ); |