ic num Num +
string str Str ~
-There are also various reference contexts that require particular kinds of
-container references.
+There are also various container contexts that require particular kinds of
+containers.
=item *
-Unlike in Perl 5, references are no longer always considered true.
+Unlike in Perl 5, objects are no longer always considered true.
It depends on the state of their C<.bit> property. Classes get to decide
which of their values are true and which are false. Individual objects
can override the class definition:
@@ -1432,9 +1430,9 @@
There is a "C" operator which imposes a list context on
its arguments even if C itself occurs in a scalar context.
In list context, it flattens lazily. In a scalar context, it returns
-a reference to the resulting list. (So the C operator really
-does exactly the same thing as putting a list in parentheses. But
-it's more readable in some situations.)
+the resulting list as a single C object. (So the C operator
+really does exactly the same thing as putting a list in parentheses.
+But it's more readable in some situations.)
=item *
@@ -1471,9 +1469,11 @@
Signatures on non-multi subs can be checked at compile time, whereas
multi sub and method call signatures can only be checked at run time
(in the absence of special instructions to the optimizer).
+
This is not a problem for arguments that are arrays or hashes,
since they don't have to care about their context, but just return
-a reference in any event, which may or may not be lazily flattened.
+themselves in any event, which may or may not be lazily flattened.
+
However, function calls in the argument list can't know their eventual
context because the method hasn't been dispatched yet, so we don't
know which signature to check against. As in Perl 5, list context
@@ -1520,7 +1520,7 @@
=item *
In contrast to assignment, binding to a hash requires a C (or
-C) reference. Binding to a "splat" hash requires a list of pairs
+C) object. Binding to a "splat" hash requires a list of pairs
or hashes, and stops processing the argument list when it runs out
of pairs or hashes. See S06 for much more about parameter binding.
Modified: doc/trunk/design/syn/S05.pod
==
--- doc/trunk/design/syn/S05.pod(original)
+++ doc/trunk/design/syn/S05.podWed Apr 5 19:08:28 2006
@@ -13,9 +13,9 @@
Maintainer: Patrick Michaud <[EMAIL PROTECTED]>
Date: 24 Jun 2002
- Last Modified: 3 Apr 2006
+ Last Modified: 6 Apr 2006
Number: 5
- Version: 14
+ Version: 15
This document summarizes Apocalypse 5, which is about the new regex
syntax. We now try to call them "rules" because they haven't been
@@ -1672,7 +1672,7 @@
if m:w/ (keep) | (toss) / {
# Each is in a separate alternation, therefore
# is not repeated in any one scope, hence $ is
- # not an array ref...
+ # not an Array object...
$action = $0;
$target = $;
}
@@ -1997,7 +1997,7 @@
/;
# Aliasing to @ means $/ is always
- # an array reference, so...
+ # an Array object, so...
say @{$/};
@@ -2152,8 +2152,8 @@
=item *
A hash alias causes the correponding hash or array element in the
-current scope's C object to be assigned a (nested) hash reference
-(rather than an array reference or a single C object).
+current scope's C object to be assigned a (nested) Hash object
+(rather than an Array object or a single C object).
=item *
@@ -2455,7 +2455,7 @@
=item *
-The two sides of each pair may also be array references:
+The two sides of each pair may also be Array objects:
$str.=trans( ['A'..'C'] => ['a'..'c'], => );
--
Rutger Vos, PhD. candidate
Department of Biological Sciences
Simon Fraser University
University Drive
Burnaby, BC, V5A1S6
Phone: 604-291-5625
Fax: 604-291-3496
Personal site: http://www.sfu.ca/~rvosa
FAB* lab: http://www.sfu.ca/~fabstar
Bio::Phylo: http://search.cpan.org/~rvosa/Bio-Phylo/