From: Gurusamy Sarathy Date: Sun, 29 Nov 1998 10:48:39 +0000 (+0000) Subject: backout change#2334 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=57668c4d7bc86e7fbc7116d331d73409d0afeaa8;p=p5sagit%2Fp5-mst-13.2.git backout change#2334 p4raw-link: @2334 on //depot/perl: 60ad88b8fe9480f2f097fca26f4f3a9f83a4f830 p4raw-id: //depot/perl@2383 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 370353b..d91cb04 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -454,9 +454,10 @@ Always use the two-argument version if the function doing the blessing might be inherited by a derived class. See L and L for more about the blessing (and blessings) of objects. -Creating objects in lowercased CLASSNAMEs should be avoided. Such -namespaces should be considered reserved for Perl pragmata and objects -that may be created to implement internal operations. +Consider always blessing objects in CLASSNAMEs that are mixed case. +Namespaces with all lowercase names are considered reserved for Perl +pragmata. Builtin types have all uppercase names, so to prevent confusion, +it is best to avoid such package names as well. See L. diff --git a/pp_hot.c b/pp_hot.c index f9ff09d..9b1791d 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -819,7 +819,7 @@ PP(pp_qr) djSP; register PMOP *pm = cPMOP; SV *rv = sv_newmortal(); - SV *sv = newSVrv(rv, "re"); + SV *sv = newSVrv(rv, "Regexp"); sv_magic(sv,(SV*)ReREFCNT_inc(pm->op_pmregexp),'r',0,0); RETURNX(PUSHs(rv)); } diff --git a/sv.c b/sv.c index 138db59..95c75da 100644 --- a/sv.c +++ b/sv.c @@ -1569,7 +1569,7 @@ sv_2pv(register SV *sv, STRLEN *lp) if ( ((SvFLAGS(sv) & (SVs_OBJECT|SVf_OK|SVs_GMG|SVs_SMG|SVs_RMG)) == (SVs_OBJECT|SVs_RMG)) - && strEQ(s=HvNAME(SvSTASH(sv)), "re") + && strEQ(s=HvNAME(SvSTASH(sv)), "Regexp") && (mg = mg_find(sv, 'r'))) { dTHR; regexp *re = (regexp *)mg->mg_obj; diff --git a/thrdvar.h b/thrdvar.h index cb39d08..39405e1 100644 --- a/thrdvar.h +++ b/thrdvar.h @@ -167,7 +167,7 @@ PERLVARI(Tregcompp, regcomp_t, FUNC_NAME_TO_PTR(pregcomp)) /* Pointer to RE compiler */ PERLVARI(Tregexecp, regexec_t, FUNC_NAME_TO_PTR(regexec_flags)) /* Pointer to RE executer */ -PERLVARI(Treginterp_cnt,int, 0) /* Whether `re' +PERLVARI(Treginterp_cnt,int, 0) /* Whether `Regexp' was interpolated. */ PERLVARI(Treg_starttry, char *, 0) /* -Dr: where regtry was called. */ #ifdef DEBUGGING