pmop->op_pmpermflags |= PMf_LOCALE;
pmop->op_pmflags = pmop->op_pmpermflags;
- /* link into pm list */
+ #ifdef USE_ITHREADS
+ {
+ SV* repointer = newSViv(0);
+ av_push(PL_regex_padav,SvREFCNT_inc(repointer));
+ pmop->op_pmoffset = av_len(PL_regex_padav);
+ PL_regex_pad = AvARRAY(PL_regex_padav);
+ }
+ #endif
+
+ /* link into pm list */
if (type != OP_TRANS && PL_curstash) {
pmop->op_pmnext = HvPMROOT(PL_curstash);
HvPMROOT(PL_curstash) = pmop;
op_free(o);
}
else {
+ deprecate("\"package\" with no arguments");
sv_setpv(PL_curstname,"<none>");
PL_curstash = Nullhv;
}
#ifdef USE_ITHREADS
if (CvFILE(cv) && !CvXSUB(cv)) {
+ /* for XSUBs CvFILE point directly to static memory; __FILE__ */
Safefree(CvFILE(cv));
- CvFILE(cv) = 0;
}
+ CvFILE(cv) = 0;
#endif
if (!CvXSUB(cv) && CvROOT(cv)) {
SvREFCNT_dec((SV*)CvXSUBANY(cv).any_ptr);
CvCONST_off(cv);
}
- CvDEFSTASH(cv) = Nullhv;
if (CvPADLIST(cv)) {
/* may be during global destruction */
if (SvREFCNT(CvPADLIST(cv))) {
CvGV(cv) = CvGV(proto);
CvSTASH(cv) = CvSTASH(proto);
CvROOT(cv) = OpREFCNT_inc(CvROOT(proto));
- CvDEFSTASH(cv) = CvDEFSTASH(proto);
CvSTART(cv) = CvSTART(proto);
if (outside)
CvOUTSIDE(cv) = (CV*)SvREFCNT_inc(outside);
}
cv_undef(cv);
CvFLAGS(cv) = CvFLAGS(PL_compcv);
- CvDEFSTASH(cv) = CvDEFSTASH(PL_compcv);
CvOUTSIDE(cv) = CvOUTSIDE(PL_compcv);
CvOUTSIDE(PL_compcv) = 0;
CvPADLIST(cv) = CvPADLIST(PL_compcv);
}
/* ... before we throw it away */
SvREFCNT_dec(PL_compcv);
+ if (PERLDB_INTER)/* Advice debugger on the new sub. */
+ ++PL_sub_generation;
}
else {
cv = PL_compcv;
CvFILE(cv) = filename; /* NOTE: not copied, as it is expected to be
an external constant string */
CvXSUB(cv) = subaddr;
- CvDEFSTASH(cv) = PL_defstash;
if (name) {
char *s = strrchr(name,':');
}
OP *
-Perl_ck_octmode(pTHX_ OP *o)
-{
- OP *p;
-
- if ((ckWARN(WARN_OCTMODE)
- /* Add WARN_MKDIR instead of getting rid of WARN_{CHMOD,UMASK}.
- Backwards compatibility and consistency are terrible things.
- AMS 20010705 */
- || (o->op_type == OP_CHMOD && ckWARN(WARN_CHMOD))
- || (o->op_type == OP_UMASK && ckWARN(WARN_UMASK))
- || (o->op_type == OP_MKDIR && ckWARN(WARN_MKDIR)))
- && o->op_flags & OPf_KIDS)
- {
- if (o->op_type == OP_MKDIR)
- p = cLISTOPo->op_last; /* mkdir $foo, 0777 */
- else if (o->op_type == OP_CHMOD)
- p = cLISTOPo->op_first->op_sibling; /* chmod 0777, $foo */
- else
- p = cUNOPo->op_first; /* umask 0222 */
-
- if (p->op_type == OP_CONST && !(p->op_private & OPpCONST_OCTAL)) {
- int mode = SvIV(cSVOPx_sv(p));
-
- Perl_warner(aTHX_ WARN_OCTMODE,
- "Non-octal literal mode (%d) specified", mode);
- Perl_warner(aTHX_ WARN_OCTMODE,
- "\t(Did you mean 0%d instead?)\n", mode);
- }
- }
- return ck_fun(o);
-}
-
-OP *
Perl_ck_open(pTHX_ OP *o)
{
HV *table = GvHV(PL_hintgv);
{
PL_curcop = ((COP*)o);
}
- goto nothin;
+ /* XXX: We avoid setting op_seq here to prevent later calls
+ to peep() from mistakenly concluding that optimisation
+ has already occurred. This doesn't fix the real problem,
+ though (See 20010220.007). AMS 20010719 */
+ if (oldop && o->op_next) {
+ oldop->op_next = o->op_next;
+ continue;
+ }
+ break;
case OP_SCALAR:
case OP_LINESEQ:
case OP_SCOPE: