This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document the SVf_PADSTALE flag
authorDave Mitchell <davem@fdisolutions.com>
Fri, 20 Feb 2004 14:18:13 +0000 (14:18 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Fri, 20 Feb 2004 14:18:13 +0000 (14:18 +0000)
p4raw-id: //depot/perl@22348

pad.c

diff --git a/pad.c b/pad.c
index 06f0417..316833d 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -91,6 +91,12 @@ become so if C<my sub foo {}> is implemented.)
 Note that formats are treated as anon subs, and are cloned each time
 write is called (if necessary).
 
+The flag SVf_PADSTALE is cleared on lexicals each time the my() is executed,
+and set on scope exit. This allows the 'Variable $x is not available' warning
+to be generated in evals, such as 
+
+    { my $x = 1; sub f { eval '$x'} } f();
+
 =cut
 */