From 339def8d4ab2da11b4f46c7bdfea86bc75ccecbd Mon Sep 17 00:00:00 2001 From: chromatic Date: Tue, 6 Dec 2011 17:15:28 -0800 Subject: [PATCH] Improved line and pagebreaking for chapter 4. --- sections/operator_characteristics.pod | 15 +++++++-------- sections/operator_types.pod | 23 ++++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sections/operator_characteristics.pod b/sections/operator_characteristics.pod index 10447776..df54493b 100644 --- a/sections/operator_characteristics.pod +++ b/sections/operator_characteristics.pod @@ -148,7 +148,7 @@ X; infix operator> =over 4 -=item I operators appear between their operands. Most mathematical +=item * I operators appear between their operands. Most mathematical operators are infix operators, such as the multiplication operator in C<$length * $width>. @@ -161,9 +161,9 @@ X; prefix operator> X; prefix operator> X; prefix operator> -=item I operators precede their operators. I operators follow. -These operators tend to be unary, such as mathematic negation (C<-$x>), boolean -negation (C), and postfix increment (C<$z++>). +=item * I operators precede their operators. I operators +follow. These operators tend to be unary, such as mathematic negation (C<-$x>), +boolean negation (C), and postfix increment (C<$z++>). X; circumfix operator> X; circumfix operator> @@ -173,15 +173,14 @@ X; circumfix operator> X; circumfix operator> X; circumfix operator> -=item I operators surround their operands, as with the anonymous +=item * I operators surround their operands, as with the anonymous hash constructor (C<{ ... }>) and quoting operators (C). X; postcircumfix operator> X; postcircumfix operator> X; postcircumfix operator> -=item I operators follow certain operands and surround others, -as seen in hash and array element access (C<$hash{ ... }> and C<$array[ ... -]>). +=item * I operators follow certain operands and surround others, +as seen in hash and array element access (C<$hash{$x}> and C<$array[$y]>). =back diff --git a/sections/operator_types.pod b/sections/operator_types.pod index 35c00c4b..5020a60d 100644 --- a/sections/operator_types.pod +++ b/sections/operator_types.pod @@ -222,15 +222,15 @@ becomes C, and C becomes C. $num++; $str++; - is( $num, 2, 'numeric autoincrement should stay numeric' ); - is( $str, 'b', 'string autoincrement should stay string' ); + is( $num, 2, 'numeric autoincrement' ); + is( $str, 'b', 'string autoincrement' ); no warnings 'numeric'; $num += $str; $str++; - is( $num, 2, 'adding $str to $num should add numeric value of $str' ); - is( $str, 1, '... but $str should now autoincrement its numeric part' ); + is( $num, 2, 'numeric addition with $str' ); + is( $str, 1, '... gives $str a numeric part' ); =end programlisting @@ -245,23 +245,24 @@ it produces a string consisting of the string value of its first operand concatenated to itself the number of times specified by its second operand. In scalar context, the operator always produces a concatenated string repeated -appropriately. - -For example: +appropriately. For example: =begin programlisting my @scheherazade = ('nights') x 1001; my $calendar = 'nights' x 1001; + my $cal_length = length $calendar; - is( @scheherazade, 1001, 'list repeated' ); - is( length $calendar, 1001 * length 'nights', 'word repeated' ); + is( @scheherazade, 1001, 'list repeated' ); + is( $length, 1001 * length 'nights', + 'word repeated' ); my @schenolist = 'nights' x 1001; my $calscalar = ('nights') x 1001; - is( @schenolist, 1, 'no lvalue list' ); - is( length $calscalar, 1001 * length 'nights', 'word still repeated' ); + is( @schenolist, 1, 'no lvalue list' ); + is( length $calscalar, + 1001 * length 'nights', 'word still repeated' ); =end programlisting