diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-02-02 18:52:27 -0800 |
---|---|---|
committer | Larry Wall <lwall@sems.com> | 1996-02-02 18:52:27 -0800 |
commit | c07a80fdfe3926b5eb0585b674aa5d1f57b32ade (patch) | |
tree | 6d56135571eb9ea6635748469bdaf72ad481247a /gv.c | |
parent | 91b7def858c29dac014df40946a128c06b3aa2ed (diff) | |
download | perl-c07a80fdfe3926b5eb0585b674aa5d1f57b32ade.tar.gz |
perl5.002beta3
[editor's note: no patch file was found for this release, so no
fine-grained changes]
I can't find the password for our ftp server, so I had to drop it into
ftp://ftp.sems.com/pub/incoming/perl5.002b3.tar.gz, which is a drop
directory you can't ls.
The current plan is that Andy is gonna whack on this a little more, and
then release a gamma in a few days when he's happy with it. So don't get
carried away. This is now *late* beta.
In other words, have less than the appropriate amount of fun. :-)
Larry
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -284,6 +284,8 @@ char* name; sv_catpvn(tmpstr,"::", 2); sv_catpvn(tmpstr, name, nend - name); sv_setsv(GvSV(CvGV(cv)), tmpstr); + if (tainting) + sv_unmagic(GvSV(CvGV(cv)), 't'); } } } @@ -338,6 +340,9 @@ I32 sv_type; bool global = FALSE; char *tmpbuf; + if (*name == '*' && isALPHA(name[1])) /* accidental stringify on a GV? */ + name++; + for (namend = name; *namend; namend++) { if ((*namend == '\'' && namend[1]) || (*namend == ':' && namend[1] == ':')) @@ -422,7 +427,8 @@ I32 sv_type; sv_type != SVt_PVCV && sv_type != SVt_PVGV && sv_type != SVt_PVFM && - sv_type != SVt_PVIO) + sv_type != SVt_PVIO && + !(len == 1 && sv_type == SVt_PV && index("ab",*name)) ) { gvp = (GV**)hv_fetch(stash,name,len,0); if (!gvp || @@ -432,10 +438,7 @@ I32 sv_type; stash = 0; else if (sv_type == SVt_PVAV && !GvAV(*gvp) || sv_type == SVt_PVHV && !GvHV(*gvp) || - sv_type == SVt_PV && - (!GvSV(*gvp) || - (!SvTYPE(GvSV(*gvp)) && - SvREFCNT(GvSV(*gvp)) == 1) )) + sv_type == SVt_PV && !GvSV(*gvp) ) { warn("Variable \"%c%s\" is not exported", sv_type == SVt_PVAV ? '@' : @@ -1074,7 +1077,7 @@ int flags; } else { if (off==-1) off=method; sprintf(buf, "Operation `%s': no method found,\n\tleft argument %s%.256s,\n\tright argument %s%.256s", - ((char**)AMG_names)[method], + ((char**)AMG_names)[method + assignshift], SvAMAGIC(left)? "in overloaded package ": "has no overloaded magic", @@ -1113,7 +1116,7 @@ int flags; * to dublicate the contents, probably calling user-supplied * version of copy operator */ - if ((method+assignshift==off + if ((method + assignshift==off && (assign || method==inc_amg || method==dec_amg)) || inc_dec_ass) RvDEEPCP(left); } @@ -1138,7 +1141,7 @@ int flags; PUSHs(lr>0? left: right); PUSHs( assign ? &sv_undef : (lr>0? &sv_yes: &sv_no)); if (notfound) { - PUSHs( sv_2mortal(newSVpv(((char**)AMG_names)[off],0)) ); + PUSHs( sv_2mortal(newSVpv(((char**)AMG_names)[method + assignshift],0)) ); } PUSHs((SV*)cv); PUTBACK; |