summaryrefslogtreecommitdiff
path: root/pod/perlpragma.pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-22 13:47:19 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-22 13:47:19 +0000
commit46e5f5f47696caa998bfcb1e374d29f888f44b9b (patch)
tree451fd5089107090f5e2363629e68ea506664fa39 /pod/perlpragma.pod
parentdc8f638738195a8f1d6774aa5a9874607346c798 (diff)
downloadperl-46e5f5f47696caa998bfcb1e374d29f888f44b9b.tar.gz
More nits in perlpragma, and remove the warning about %^H being
strictly internal in perlvar. p4raw-id: //depot/perl@28271
Diffstat (limited to 'pod/perlpragma.pod')
-rw-r--r--pod/perlpragma.pod14
1 files changed, 8 insertions, 6 deletions
diff --git a/pod/perlpragma.pod b/pod/perlpragma.pod
index 9c4fd2b082..3bdf8b79aa 100644
--- a/pod/perlpragma.pod
+++ b/pod/perlpragma.pod
@@ -115,12 +115,14 @@ and C<no myint;> is
Hence the C<import> and C<unimport> routines are called at B<compile time>
for the user's code.
-User pragmata store their state by writing to C<%^H>, hence these two
-routines manipulate C<%^H>. The state information in C<%^H> is stored in the
-optree, and can be retrieved at runtime with C<caller>, at index 10 of the
-list of returned results. In the example pragma, retrieval is encapsulated
-into the routine C<in_effect()>. This uses C<caller(0)> to determine the
-state of C<$^H{myint}> when each line of the user's script was called, and
+User pragmata store their state by writing to the magical hash C<%^H>,
+hence these two routines manipulate it. The state information in C<%^H> is
+stored in the optree, and can be retrieved at runtime with C<caller>, at
+index 10 of the list of returned results. In the example pragma, retrieval
+is encapsulated into the routine C<in_effect()>, which takes as parameter
+the number of call frames to go up to find the value of the pragma in the
+user's script. This uses C<caller()> to determine the value of
+C<$^H{myint}> when each line of the user's script was called, and
therefore provide the correct semantics in the subroutine implementing the
overloaded addition.