summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-11 19:11:18 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-11 19:11:18 +0000
commitbe3174d2532d82826fc0aa416a83ef8ce0f07732 (patch)
treedcb2f29d4e1d0a6db01d7d1c2c96304de9c13b8d /pod
parent5e5f20b507b6c3b7749b1f2f6cfd8a156eca9deb (diff)
downloadperl-be3174d2532d82826fc0aa416a83ef8ce0f07732.tar.gz
integrate cfgperl changes#6268..6282 into mainline
p4raw-link: @6282 on //depot/cfgperl: d4817f5b97d4072a6efac47844b617245b179f2c p4raw-link: @6268 on //depot/cfgperl: 22e04bdb3a09a4c369fd1666143349eab2eba9d4 p4raw-id: //depot/perl@6366 p4raw-integrated: from //depot/cfgperl@6365 'copy in' lib/Net/Ping.pm lib/Text/Wrap.pm t/lib/dprof.t t/lib/dumper-ovl.t t/lib/hostname.t (@5586..) lib/Pod/Html.pm (@5608..) t/lib/ipc_sysv.t (@5812..) t/lib/dumper.t (@5972..) ext/File/Glob/Glob.pm (@6026..) lib/Pod/Man.pm lib/Pod/Text.pm (@6034..) t/lib/anydbm.t (@6072..) lib/ExtUtils/xsubpp (@6156..) pod/perlsub.pod pod/perltie.pod (@6206..) utils/h2xs.PL (@6280..) p4raw-integrated: from //depot/cfgperl@6282 'merge in' vms/vms.c (@6238..) p4raw-integrated: from //depot/cfgperl@6277 'copy in' pod/perlfunc.pod (@6276..) p4raw-integrated: from //depot/cfgperl@6273 'ignore' perlapi.h (@6243..) embedvar.h (@6254..) 'merge in' perlapi.c (@6243..) embed.h (@6254..) embed.pl objXSUB.h op.c proto.h (@6269..) p4raw-integrated: from //depot/cfgperl@6270 'copy in' t/op/taint.t (@5857..) p4raw-integrated: from //depot/cfgperl@6269 'copy in' doop.c (@6263..) 'ignore' toke.c (@6261..) p4raw-integrated: from //depot/cfgperl@6268 'copy in' t/op/sprintf.t (@6267..)
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfunc.pod22
-rw-r--r--pod/perlsub.pod2
-rw-r--r--pod/perltie.pod16
3 files changed, 20 insertions, 20 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 00fc8601a4..78a631883e 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1265,11 +1265,11 @@ there was an error.
In the first form, the return value of EXPR is parsed and executed as if it
were a little Perl program. The value of the expression (which is itself
determined within scalar context) is first parsed, and if there weren't any
-errors, executed in the context of the current Perl program, so that any
-variable settings or subroutine and format definitions remain afterwards.
-Note that the value is parsed every time the eval executes. If EXPR is
-omitted, evaluates C<$_>. This form is typically used to delay parsing
-and subsequent execution of the text of EXPR until run time.
+errors, executed in the lexical context of the current Perl program, so
+that any variable settings or subroutine and format definitions remain
+afterwards. Note that the value is parsed every time the eval executes.
+If EXPR is omitted, evaluates C<$_>. This form is typically used to
+delay parsing and subsequent execution of the text of EXPR until run time.
In the second form, the code within the BLOCK is parsed only once--at the
same time the code surrounding the eval itself was parsed--and executed
@@ -2078,9 +2078,9 @@ or equivalently,
@foo = grep {!/^#/} @bar; # weed out comments
-Note that, because C<$_> is a reference into the list value, it can
-be used to modify the elements of the array. While this is useful and
-supported, it can cause bizarre results if the LIST is not a named array.
+Note that C<$_> is an alias to the list value, so it can be used to
+modify the elements of the LIST. While this is useful and supported,
+it can cause bizarre results if the elements of LIST are not variables.
Similarly, grep returns aliases into the original list, much as a for
loop's index variable aliases the list elements. That is, modifying an
element of a list returned by grep (for example, in a C<foreach>, C<map>
@@ -2462,9 +2462,9 @@ is just a funny way to write
$hash{getkey($_)} = $_;
}
-Note that, because C<$_> is a reference into the list value, it can
-be used to modify the elements of the array. While this is useful and
-supported, it can cause bizarre results if the LIST is not a named array.
+Note that C<$_> is an alias to the list value, so it can be used to
+modify the elements of the LIST. While this is useful and supported,
+it can cause bizarre results if the elements of LIST are not variables.
Using a regular C<foreach> loop for this purpose would be clearer in
most cases. See also L</grep> for an array composed of those items of
the original list for which the BLOCK or EXPR evaluates to true.
diff --git a/pod/perlsub.pod b/pod/perlsub.pod
index f45f5494f6..997631674f 100644
--- a/pod/perlsub.pod
+++ b/pod/perlsub.pod
@@ -39,7 +39,7 @@ To call subroutines:
Like many languages, Perl provides for user-defined subroutines.
These may be located anywhere in the main program, loaded in from
other files via the C<do>, C<require>, or C<use> keywords, or
-generated on the fly using C<eval> or anonymous subroutines (closures).
+generated on the fly using C<eval> or anonymous subroutines.
You can even call a function indirectly using a variable containing
its name or a CODE reference.
diff --git a/pod/perltie.pod b/pod/perltie.pod
index 49bf98999c..b39d7d5336 100644
--- a/pod/perltie.pod
+++ b/pod/perltie.pod
@@ -310,14 +310,14 @@ the following output demonstrates:
=head2 Tying Hashes
-As the first Perl data type to be tied (see dbmopen()), hashes have the
-most complete and useful tie() implementation. A class implementing a
-tied hash should define the following methods: TIEHASH is the constructor.
-FETCH and STORE access the key and value pairs. EXISTS reports whether a
-key is present in the hash, and DELETE deletes one. CLEAR empties the
-hash by deleting all the key and value pairs. FIRSTKEY and NEXTKEY
-implement the keys() and each() functions to iterate over all the keys.
-And DESTROY is called when the tied variable is garbage collected.
+Hashes were the first Perl data type to be tied (see dbmopen()). A class
+implementing a tied hash should define the following methods: TIEHASH is
+the constructor. FETCH and STORE access the key and value pairs. EXISTS
+reports whether a key is present in the hash, and DELETE deletes one.
+CLEAR empties the hash by deleting all the key and value pairs. FIRSTKEY
+and NEXTKEY implement the keys() and each() functions to iterate over all
+the keys. And DESTROY is called when the tied variable is garbage
+collected.
If this seems like a lot, then feel free to inherit from merely the
standard Tie::Hash module for most of your methods, redefining only the