summaryrefslogtreecommitdiff
path: root/pod/perlapi.pod
diff options
context:
space:
mode:
authorBrandon Black <blblack@gmail.com>2007-04-29 12:27:03 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-30 09:22:58 +0000
commitdd69841bebe1fc7f7a6b248576221520a0418d52 (patch)
tree03f70519210b8c576d1dde888623afef3e9882ba /pod/perlapi.pod
parent49d7dfbcef7527d25e8c34643f831ef2416923a3 (diff)
downloadperl-dd69841bebe1fc7f7a6b248576221520a0418d52.tar.gz
Re: mro status, etc
From: "Brandon Black" <blblack@gmail.com> Message-ID: <84621a60704291527y1b39be37l221ef66e4c828f66@mail.gmail.com> p4raw-id: //depot/perl@31107
Diffstat (limited to 'pod/perlapi.pod')
-rw-r--r--pod/perlapi.pod33
1 files changed, 19 insertions, 14 deletions
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index cc649f0e78..7c0aa88403 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -2810,20 +2810,25 @@ of the given stash, so that they might notice
the changes in this one.
Ideally, all instances of C<PL_sub_generation++> in
-the perl source outside of C<mro.c> should be
-replaced by calls to this. This conversion is
-nearly complete.
-
-Perl has always had problems with method caches
-getting out of sync when one directly manipulates
-stashes via things like C<%{Foo::} = %{Bar::}> or
-C<${Foo::}{bar} = ...> or the equivalent. If
-you do this in core or XS code, call this afterwards
-on the destination stash to get things back in sync.
-
-If you're doing such a thing from pure perl, use
-C<mro::method_changed_in(classname)>, which
-just calls this.
+perl source outside of C<mro.c> should be
+replaced by calls to this.
+
+Perl automatically handles most of the common
+ways a method might be redefined. However, there
+are a few ways you could change a method in a stash
+without the cache code noticing, in which case you
+need to call this method afterwards:
+
+1) Directly manipulating the stash HV entries from
+XS code.
+
+2) Assigning a reference to a readonly scalar
+constant into a stash entry in order to create
+a constant subroutine (like constant.pm
+does).
+
+This same method is available from pure perl
+via, C<mro::method_changed_in(classname)>.
void mro_method_changed_in(HV* stash)