summaryrefslogtreecommitdiff
path: root/pod/perlguts.pod
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-10-31 22:44:31 +0100
committerYves Orton <demerphq@gmail.com>2016-11-01 13:29:48 +0100
commit27deb0cf05ad74bec9ea0da3d1b6405346a66401 (patch)
treef40af34d9d18411571c3159c6cc104729969e672 /pod/perlguts.pod
parentb634eb441c2bbbdbcd8dbcbbc4097658c7439a1f (diff)
downloadperl-27deb0cf05ad74bec9ea0da3d1b6405346a66401.tar.gz
new feature @{^CAPTURE} (and %{^CAPTURE} and %{^CAPTURE_ALL})
@{^CAPTURE} exposes the capture buffers of the last match as an array. So $1 is ${^CAPTURE}[0]. %{^CAPTURE} is the equivalent to %+ (ie named captures) %{^CAPTURE_ALL} is the equivalent to %- (ie all named captures).
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r--pod/perlguts.pod5
1 files changed, 3 insertions, 2 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index a6aba00cfc..7f72d65b02 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -1087,8 +1087,9 @@ referring to 'U' magic rather than C<PERL_MAGIC_uvar> for example.
The C<obj> argument is stored in the C<mg_obj> field of the C<MAGIC>
structure. If it is not the same as the C<sv> argument, the reference
count of the C<obj> object is incremented. If it is the same, or if
-the C<how> argument is C<PERL_MAGIC_arylen>, or if it is a NULL pointer,
-then C<obj> is merely stored, without the reference count being incremented.
+the C<how> argument is C<PERL_MAGIC_arylen>, C<PERL_MAGIC_regdatum>,
+C<PERL_MAGIC_regdata>, or if it is a NULL pointer, then C<obj> is merely
+stored, without the reference count being incremented.
See also C<sv_magicext> in L<perlapi> for a more flexible way to add magic
to an SV.