diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-18 20:17:22 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-18 20:17:22 +0000 |
commit | ac27b0f573239284c298fcf96fb6c966551ef207 (patch) | |
tree | 13447eed9b72cd6cfd50796c13cabbf22c4383d6 /gv.c | |
parent | b931b1d952313afa398828ff4b2a40af20cfa65a (diff) | |
download | perl-ac27b0f573239284c298fcf96fb6c966551ef207.tar.gz |
Lexical use open ... support:
add ->cop_io to COP structure in cop.h.
Make mg.c and gv.c associate it with ${^OPEN}.
Make lib/open.pm set it.
Have sv.c, perl.c, pp_ctl.c, op.c manipulate it in a manner
manner similar to ->cop_warnings.
Have doio.c's do_open9 and pp_sys.c's pp_backticks use it as default and
call new PerlIO_apply_layers().
Declare latter in perlio.h and define in perlio.c
p4raw-id: //depot/perlio@7740
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -848,12 +848,15 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) case '\006': /* $^F */ case '\010': /* $^H */ case '\011': /* $^I, NOT \t in EBCDIC */ - case '\017': /* $^O */ case '\020': /* $^P */ case '\024': /* $^T */ if (len > 1) break; goto magicalize; + case '\017': /* $^O & $^OPEN */ + if (len > 1 && strNE(name, "\017PEN")) + break; + goto magicalize; case '\023': /* $^S */ if (len > 1) break; @@ -1672,6 +1675,13 @@ Perl_is_gv_magical(pTHX_ char *name, STRLEN len, U32 flags) if (len == 3 && strEQ(name, "SIG")) goto yes; break; + case '\017': /* $^O & $^OPEN */ + if (len == 1 + || (len == 4 && strEQ(name, "\027PEN"))) + { + goto yes; + } + break; case '\027': /* $^W & $^WARNING_BITS */ if (len == 1 || (len == 12 && strEQ(name, "\027ARNING_BITS")) @@ -1715,7 +1725,6 @@ Perl_is_gv_magical(pTHX_ char *name, STRLEN len, U32 flags) case '\010': /* $^H */ case '\011': /* $^I, NOT \t in EBCDIC */ case '\014': /* $^L */ - case '\017': /* $^O */ case '\020': /* $^P */ case '\023': /* $^S */ case '\024': /* $^T */ |