Skip to content

Commit 7aff36d

Browse files
committed
Wrap overly-long lines to aid readability
1 parent 92d7bd5 commit 7aff36d

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

lib/Language/5to6.pod

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ allowed:
136136
my @books = $xml.parse-file($file)\ # some comment
137137
.findnodes("/library/book");
138138
139-
See also L<S03#Minimal whitespace DWIMmery|http://design.perl6.org/S03.html#Minimal_whitespace_DWIMmery> and L<S04#Statement parsing|http://design.perl6.org/S04.html#Statement_parsing> in the Perl 6 design docs.
139+
See also L<S03#Minimal whitespace
140+
DWIMmery|http://design.perl6.org/S03.html#Minimal_whitespace_DWIMmery> and
141+
L<S04#Statement parsing|http://design.perl6.org/S04.html#Statement_parsing>
142+
in the Perl 6 design docs.
140143
141144
142145
=head3 Sigils
@@ -248,7 +251,8 @@ variable holding a code object as an argument:
248251
=end item
249252
250253
=begin item
251-
C<&foo;> I<and> C<goto &foo;> I<for re-using the caller's argument list / replacing the caller in the call stack>
254+
C<&foo;> I<and> C<goto &foo;> I<for re-using the caller's argument list /
255+
replacing the caller in the call stack>
252256
253257
sub foo { say "before"; &bar; say "after" } # Perl 5
254258
sub foo { say "before"; bar(|@_); say "after" } # Perl 6 - have to be explicit
@@ -503,7 +507,8 @@ expect Pairs. However, this requires you to change all sub calls at once.
503507
504508
=head3 C<? :> Ternary operator
505509
506-
Now spelled with two question marks instead of one question mark, and two exclamation points instead of one colon.
510+
Now spelled with two question marks instead of one question mark, and two
511+
exclamation points instead of one colon.
507512
508513
my $result = ( $score > 60 ) ? 'Pass' : 'Fail'; # Perl 5
509514
my $result = ( $score > 60 ) ?? 'Pass' !! 'Fail'; # Perl 6
@@ -638,12 +643,15 @@ Parens are optional.
638643
The iteration variable, if any, has been moved from before the list, to
639644
after the list and an added arrow operator.
640645
641-
The iteration variable is now always lexical; C<my> is neither needed nor allowed.
646+
The iteration variable is now always lexical; C<my> is neither needed nor
647+
allowed.
642648
643-
In Perl 5, the iteration variable is a read-write alias to the current list element.
649+
In Perl 5, the iteration variable is a read-write alias to the current list
650+
element.
644651
645-
In Perl 6, that alias is read-only (for safety), unless you change C«->» to C«<->».
646-
When translating, inspect the use of the loop variable to decide if read-write is needed.
652+
In Perl 6, that alias is read-only (for safety), unless you change C«->» to
653+
C«<->». When translating, inspect the use of the loop variable to decide if
654+
read-write is needed.
647655
648656
for my $car (@cars) {...} # Perl 5; read-write
649657
for @cars -> $car {...} # Perl 6; read-only
@@ -723,7 +731,8 @@ require you to add the optional C<m> on a plain match like C«/abc/».
723731
724732
=head3 Add :P5 or :Perl5 adverb
725733
726-
If the actual regex is complex, you may want to use it as-is, by adding the C<P5> modifier.
734+
If the actual regex is complex, you may want to use it as-is, by adding the
735+
C<P5> modifier.
727736
728737
next if $line =~ m/[aeiou]/ ; # Perl 5
729738
next if $line ~~ m:P5/[aeiou]/ ; # Perl 6, using P5 modifier
@@ -763,7 +772,8 @@ For look-around assertions:
763772
764773
(Unrelated to <> syntax, the "lookaround" C</foo\Kbar/> becomes C</foo <( bar /> )>
765774
766-
=item C<(?(?{condition))yes-pattern|no-pattern)> becomes C«[ <?{condition}> yes-pattern | no-pattern ]»
775+
=item C<(?(?{condition))yes-pattern|no-pattern)> becomes C«[ <?{condition}>
776+
yes-pattern | no-pattern ]»
767777
768778
=head3 Longest token matching (LTM) displaces alternation
769779

0 commit comments

Comments
 (0)