summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-11-28 10:24:52 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-11-28 10:24:52 +0000
commit60ad88b8fe9480f2f097fca26f4f3a9f83a4f830 (patch)
treef603966fee22edfe9ad8fb9dc11fdd4d04b4868a
parentab19240082dfba31ce2fd03e2c5d9e7779bcdc76 (diff)
downloadperl-60ad88b8fe9480f2f097fca26f4f3a9f83a4f830.tar.gz
s/Regexp/re/ and clarify policy on lowercased object namespaces
p4raw-id: //depot/perl@2334
-rw-r--r--pod/perlfunc.pod6
-rw-r--r--pp_hot.c2
-rw-r--r--sv.c2
-rw-r--r--thrdvar.h2
4 files changed, 9 insertions, 3 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 8852b1829c..265aad439d 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -454,6 +454,12 @@ Always use the two-argument version if the function doing the blessing
might be inherited by a derived class. See L<perltoot> and L<perlobj>
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.
+
+See L<perlmod/"Perl Modules">.
+
=item caller EXPR
=item caller
diff --git a/pp_hot.c b/pp_hot.c
index 8e35e8a9c7..713b1d16a8 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, "Regexp");
+ SV *sv = newSVrv(rv, "re");
sv_magic(sv,(SV*)ReREFCNT_inc(pm->op_pmregexp),'r',0,0);
RETURNX(PUSHs(rv));
}
diff --git a/sv.c b/sv.c
index 95c75da355..138db59881 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)), "Regexp")
+ && strEQ(s=HvNAME(SvSTASH(sv)), "re")
&& (mg = mg_find(sv, 'r'))) {
dTHR;
regexp *re = (regexp *)mg->mg_obj;
diff --git a/thrdvar.h b/thrdvar.h
index 335ebc4d43..93c4546594 100644
--- a/thrdvar.h
+++ b/thrdvar.h
@@ -161,7 +161,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 `Regexp'
+PERLVARI(Treginterp_cnt,int, 0) /* Whether `re'
was interpolated. */
#ifdef DEBUGGING
PERLVARI(Twatchaddr, char **, 0)