Skip to content

Commit d1c8d8a

Browse files
committed
Remove leading indentation from (some) pod code blocks.
1 parent 75470b4 commit d1c8d8a

19 files changed

+964
-964
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 407 additions & 407 deletions
Large diffs are not rendered by default.

doc/Language/5to6-perlfunc.pod6

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can, of course, use an already opened filehandle. Here, using the file
5656
handle C<$fh>, is an example, using the method syntax for the file test:
5757
5858
=for code :preamble<my $fh;>
59-
$fh.r
59+
$fh.r
6060
6161
Most of the former filetests have colon equivalents for use with smart match:
6262
@@ -76,9 +76,9 @@ All of these tests can be used as methods (without the colon).
7676
Three tests, however, I<only> have method equivalents:
7777
7878
=for code :preamble<my $fh;>
79-
$fh.modified; # -M $fh
80-
$fh.accessed; # -A $fh
81-
$fh.changed; # -C $fh
79+
$fh.modified; # -M $fh
80+
$fh.accessed; # -A $fh
81+
$fh.changed; # -C $fh
8282
8383
The remaining filetests in Perl 5 do not appear to be implemented
8484
in Perl 6.
@@ -425,8 +425,8 @@ families.)
425425
In Perl 6, this is not a function, but an adverb:
426426
427427
=for code :preamble<no strict;>
428-
%hash{$key}:exists;
429-
@array[$i]:exists;
428+
%hash{$key}:exists;
429+
@array[$i]:exists;
430430
431431
=head2 exit
432432
@@ -1067,9 +1067,9 @@ L<append method|/type/Array#method_append>.
10671067
These survive the transition to Perl 6. Some notes:
10681068
10691069
=for code
1070-
q/.../; # is still equivalent to using single quotes.
1071-
qq/.../; # is still equivalent to using double quotes.
1072-
qw/.../; # is more commonly rendered as C<< <...> >> in Perl 6.
1070+
q/.../; # is still equivalent to using single quotes.
1071+
qq/.../; # is still equivalent to using double quotes.
1072+
qw/.../; # is more commonly rendered as C<< <...> >> in Perl 6.
10731073
10741074
There are some added quoting constructs and equivalents, as explained at
10751075
L<quoting|/language/quoting>.

doc/Language/faq.pod6

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@ for dumping, whose output is similar to L<perl>, but with more information.
250250
Examples:
251251
252252
=begin code :ok-test<dd>
253-
my $foo = %( foo => 'bar' );
254-
say $foo.perl; # OUTPUT: «${:foo("bar")}␤»
255-
say $foo; # OUTPUT: «{foo => bar}␤»
253+
my $foo = %( foo => 'bar' );
254+
say $foo.perl; # OUTPUT: «${:foo("bar")}␤»
255+
say $foo; # OUTPUT: «{foo => bar}␤»
256256
257-
# non-standard routine available in rakudo implementation:
258-
dd $foo; # OUTPUT: «Hash $foo = ${:foo("bar")}␤»
257+
# non-standard routine available in rakudo implementation:
258+
dd $foo; # OUTPUT: «Hash $foo = ${:foo("bar")}␤»
259259
=end code
260260
261261
There are also L<several ecosystem modules|https://modules.perl6.org/s/dump>
@@ -281,11 +281,11 @@ otherwise it's runtime.
281281
Example:
282282
283283
=for code
284-
say 1/0; # Attempt to divide 1 by zero using div
284+
say 1/0; # Attempt to divide 1 by zero using div
285285
286286
=begin code :skip-test<compile time error>
287-
sub foo( Int $a, Int $b ) {...}
288-
foo(1) # ===SORRY!=== Error while compiling ...
287+
sub foo( Int $a, Int $b ) {...}
288+
foo(1) # ===SORRY!=== Error while compiling ...
289289
=end code
290290
291291
=head2 What is C<(Any)>?

doc/Language/glossary.pod6

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ L<Complex>). This allows you to use such literals in places where
9696
expressions are not allowed, for example, as literals in signatures:
9797
9898
=for code :skip-test
99-
# Wrong, can't use an operator there:
100-
multi foo (1/3) { say "It's one third!" }
99+
# Wrong, can't use an operator there:
100+
multi foo (1/3) { say "It's one third!" }
101101
=for code
102-
# Right, a Rat literal:
103-
multi foo (<1/3>) { say "It's one third!" }
102+
# Right, a Rat literal:
103+
multi foo (<1/3>) { say "It's one third!" }
104104
105105
If you I<do> want an allomorph and not a literal L<Numeric>,
106106
then include whitespace around angle brackets:
@@ -881,10 +881,10 @@ a L<Seq>. The following code contains a bug; keeping reification in mind, try to
881881
spot it:
882882
883883
=for code
884-
my $fh = "/tmp/bar".IO.open;
885-
my $lines = $fh.lines;
886-
close $fh;
887-
say $lines[0];
884+
my $fh = "/tmp/bar".IO.open;
885+
my $lines = $fh.lines;
886+
close $fh;
887+
say $lines[0];
888888
889889
We open a L<file handle|/type/IO::Handle>, then assign return of
890890
L«C<.lines>|/type/IO::Handle#method_lines» to a L<Scalar> variable, so the
@@ -900,19 +900,19 @@ a C<@>-sigiled variable or call L«C<.elems>|/routine/elems» on C<$lines> befor
900900
closing the handle:
901901
902902
=for code
903-
my $fh = "/tmp/bar".IO.open;
904-
my @lines = $fh.lines;
905-
close $fh;
906-
say @lines[0]; # no problem!
903+
my $fh = "/tmp/bar".IO.open;
904+
my @lines = $fh.lines;
905+
close $fh;
906+
say @lines[0]; # no problem!
907907
908908
Also good:
909909
910910
=for code
911-
my $fh = "/tmp/bar".IO.open;
912-
my $lines = $fh.lines;
913-
say "Read $lines.elems() lines"; #reifying before closing handle
914-
close $fh;
915-
say $lines[0]; # no problem!
911+
my $fh = "/tmp/bar".IO.open;
912+
my $lines = $fh.lines;
913+
say "Read $lines.elems() lines"; #reifying before closing handle
914+
close $fh;
915+
say $lines[0]; # no problem!
916916
917917
=head1 Repository
918918
X<|Repository>

doc/Language/list.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ with parentheses, so:
2424
There is one exception, empty lists are created with just parenthesis:
2525
2626
=for code :skip-test
27-
(); # This is an empty List
28-
(,); # This is a syntax error
27+
(); # This is an empty List
28+
(,); # This is a syntax error
2929
3030
Note that hanging commas are just fine as long as the beginning and
3131
end of a list are clear, so feel free to use them for easy code editing.

doc/Language/operators.pod6

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -940,12 +940,12 @@ In most cases, this behaves identically to the postfix mutator, but the
940940
precedence is lower:
941941
942942
=for code :skip-test
943-
my $a = -5
944-
say ++$a.=abs
945-
# OUTPUT: «6␤»
946-
say ++$a .= abs
947-
# OUTPUT: «Cannot modify an immutable Int␤
948-
# in block <unit> at <tmp> line 1␤␤»
943+
my $a = -5
944+
say ++$a.=abs
945+
# OUTPUT: «6␤»
946+
say ++$a .= abs
947+
# OUTPUT: «Cannot modify an immutable Int␤
948+
# in block <unit> at <tmp> line 1␤␤»
949949
950950
=head2 infix C«.»
951951
@@ -2406,16 +2406,16 @@ item. In other words, L<notandthen> is a means to act when items aren't
24062406
defined, whereas L<orelse> is a means to obtain the first defined item:
24072407
24082408
=begin code
2409-
sub all-sensors-down { [notandthen] |@_, True }
2410-
sub first-working-sensor { [orelse] |@_, 'default sensor' }
2409+
sub all-sensors-down { [notandthen] |@_, True }
2410+
sub first-working-sensor { [orelse] |@_, 'default sensor' }
24112411
2412-
all-sensors-down Nil, Nil, Nil
2413-
and say 'OMG! All sensors are down!'; # OUTPUT:«OMG! All sensors are down!␤»
2414-
say first-working-sensor Nil, Nil, Nil; # OUTPUT:«default sensor␤»
2412+
all-sensors-down Nil, Nil, Nil
2413+
and say 'OMG! All sensors are down!'; # OUTPUT:«OMG! All sensors are down!␤»
2414+
say first-working-sensor Nil, Nil, Nil; # OUTPUT:«default sensor␤»
24152415
2416-
all-sensors-down Nil, 42, Nil
2417-
and say 'OMG! All sensors are down!'; # No output
2418-
say first-working-sensor Nil, 42, Nil; # OUTPUT:«42␤»
2416+
all-sensors-down Nil, 42, Nil
2417+
and say 'OMG! All sensors are down!'; # No output
2418+
say first-working-sensor Nil, 42, Nil; # OUTPUT:«42␤»
24192419
=end code
24202420
24212421
The C<andthen> operator is a close relative of
@@ -2424,10 +2424,10 @@ compile C<without> to C<notandthen>, meaning these two lines have equivalent
24242424
behaviour:
24252425
24262426
=begin code
2427-
sub good-things { fail }
2427+
sub good-things { fail }
24282428
2429-
'boo'.say without good-things;
2430-
good-things() notandthen 'boo'.say;
2429+
'boo'.say without good-things;
2430+
good-things() notandthen 'boo'.say;
24312431
=end code
24322432
24332433
=head1 Loose OR Precedence

doc/Language/phasers.pod6

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,31 @@ them respond to various control exceptions and exit values.
2020
Here is a summary:
2121
2222
=begin code :skip-test
23-
BEGIN {...} # * at compile time, ASAP, only ever runs once
24-
CHECK {...} # * at compile time, ALAP, only ever runs once
25-
INIT {...} # * at run time, ASAP, only ever runs once
26-
END {...} # at run time, ALAP, only ever runs once
23+
BEGIN {...} # * at compile time, ASAP, only ever runs once
24+
CHECK {...} # * at compile time, ALAP, only ever runs once
25+
INIT {...} # * at run time, ASAP, only ever runs once
26+
END {...} # at run time, ALAP, only ever runs once
2727
28-
ENTER {...} # * at every block entry time, repeats on loop blocks.
29-
LEAVE {...} # at every block exit time (even stack unwinds from exceptions)
30-
KEEP {...} # at every successful block exit, part of LEAVE queue
31-
UNDO {...} # at every unsuccessful block exit, part of LEAVE queue
28+
ENTER {...} # * at every block entry time, repeats on loop blocks.
29+
LEAVE {...} # at every block exit time (even stack unwinds from exceptions)
30+
KEEP {...} # at every successful block exit, part of LEAVE queue
31+
UNDO {...} # at every unsuccessful block exit, part of LEAVE queue
3232
33-
FIRST {...} # at loop initialization time, before any ENTER
34-
NEXT {...} # at loop continuation time, before any LEAVE
35-
LAST {...} # at loop termination time, after any LEAVE
33+
FIRST {...} # at loop initialization time, before any ENTER
34+
NEXT {...} # at loop continuation time, before any LEAVE
35+
LAST {...} # at loop termination time, after any LEAVE
3636
37-
PRE {...} # assert precondition at every block entry, before ENTER
38-
POST {...} # assert postcondition at every block exit, after LEAVE
37+
PRE {...} # assert precondition at every block entry, before ENTER
38+
POST {...} # assert postcondition at every block exit, after LEAVE
3939
40-
CATCH {...} # catch exceptions, before LEAVE
41-
CONTROL {...} # catch control exceptions, before LEAVE
40+
CATCH {...} # catch exceptions, before LEAVE
41+
CONTROL {...} # catch control exceptions, before LEAVE
4242
43-
LAST {...} # supply tapped by whenever-block is done, runs very last
44-
QUIT {...} # catch async exceptions within a whenever-block, runs very last
43+
LAST {...} # supply tapped by whenever-block is done, runs very last
44+
QUIT {...} # catch async exceptions within a whenever-block, runs very last
4545
46-
COMPOSE {...} # when a role is composed into a class
47-
CLOSE {...} # appears in a supply block, called when the supply is closed
46+
COMPOSE {...} # when a role is composed into a class
47+
CLOSE {...} # appears in a supply block, called when the supply is closed
4848
=end code
4949
5050
Phasers marked with a C<*> have a run-time value, and if evaluated earlier than

doc/Language/pragmas.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ C<strict> is the default behavior, and requires that you declare variables
123123
before using them. You can relax this restriction with C<no>.
124124
125125
=for code
126-
no strict; $x = 42; # OK
126+
no strict; $x = 42; # OK
127127
128128
=item X<B<trace>|trace>
129129

0 commit comments

Comments
 (0)