Change 24685: Indent fix
[email protected] (Rafael Garcia-Suarez) Fri, 3 Jun 2005 01:28:37 -0700
| Newsgroups | perl.perlfaq.workers,perl.perl5.changes |
|---|---|
| Message-ID | <[email protected]> |
Change 24685 by rgs@bloom on 2005/06/03 07:59:48
Indent fix
Affected files ...
... //depot/perl/pod/perlfaq7.pod#45 edit
Differences ...
==== //depot/perl/pod/perlfaq7.pod#45 (text) ====
Index: perl/pod/perlfaq7.pod
--- perl/pod/perlfaq7.pod#44~24684~ Fri Jun 3 00:58:10 2005
+++ perl/pod/perlfaq7.pod Fri Jun 3 00:59:48 2005
@@ -431,16 +431,16 @@
The data in chunk of memory defined by C<$count> is private to
C<counter>.
- BEGIN {
- my $count = 1;
- sub counter { $count++ }
- }
+ BEGIN {
+ my $count = 1;
+ sub counter { $count++ }
+ }
- my $start = count();
+ my $start = count();
- .... # code that calls count();
+ .... # code that calls count();
- my $end = count();
+ my $end = count();
In the previous example, you created a function-private variable
because only one function remembered its reference. You could define
@@ -457,7 +457,7 @@
my $count = 1;
sub increment_count { $count++ }
sub return_count { $count }
- }
+ }
To declare a file-private variable, you still use a lexical variable.
A file is also a scope, so a lexical variable defined in the file
End of Patch.