sv.h: Improve docs of Sv[GS]ETMAGIC
authorFather Chrysostomos <sprout@cpan.org>
Tue, 3 Jul 2012 20:55:47 +0000 (13:55 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 3 Jul 2012 21:01:06 +0000 (14:01 -0700)
sv.h

diff --git a/sv.h b/sv.h
index c708ae5..1eeda1c 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1923,11 +1923,14 @@ incremented.
 =head1 Magical Functions
 
 =for apidoc Am|void|SvGETMAGIC|SV* sv
-Invokes C<mg_get> on an SV if it has 'get' magic.  This macro evaluates its
+Invokes C<mg_get> on an SV if it has 'get' magic.  For example, this
+will call C<FETCH> on a tied variable.  This macro evaluates its
 argument more than once.
 
 =for apidoc Am|void|SvSETMAGIC|SV* sv
-Invokes C<mg_set> on an SV if it has 'set' magic.  This macro evaluates its
+Invokes C<mg_set> on an SV if it has 'set' magic.  This is necessary
+after modifying a scalar, in case it is a magical variable like C<$|>
+or a tied variable (it calls C<STORE>).  This macro evaluates its
 argument more than once.
 
 =for apidoc Am|void|SvSetSV|SV* dsb|SV* ssv