Skip to content

Commit 259d2ad

Browse files
committed
Merge pull request #194 from dha/master
Indentations for better web rendering
2 parents ea13a15 + b9434b1 commit 259d2ad

File tree

3 files changed

+56
-56
lines changed

3 files changed

+56
-56
lines changed

doc/Language/5to6-perlfunc.pod

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,32 @@ traditional way (although you can) to do a filetest. You can simply append
5656
C<.IO> to the filename. For instance, here is how to check if a file is
5757
readable using smart match:
5858
59-
C<'/path/to/file'.IO ~~ :r>
59+
C<'/path/to/file'.IO ~~ :r>
6060
6161
You can, of course, use an already opened filehandle. Here, using the file
6262
handle C<$fh>, is an example, using the method syntax for the file test:
6363
64-
C<$fh.r>
64+
C<$fh.r>
6565
6666
Most of the former filetests have colon equivalents for use with smart match:
6767
68-
:e Exists
69-
:d Directory
70-
:f File
71-
:l Symbolic link
72-
:r Readable
73-
:w Writable
74-
:x Executable
75-
:s Size
76-
:z Zero size
68+
:e Exists
69+
:d Directory
70+
:f File
71+
:l Symbolic link
72+
:r Readable
73+
:w Writable
74+
:x Executable
75+
:s Size
76+
:z Zero size
7777
7878
All of these tests can be used as methods (without the colon).
7979
8080
Three tests, however, I<only> have method equivalents:
8181
82-
C<-M $fh> => C<$fh.modified>
83-
C<-A $fh> => C<$fh.accessed>
84-
C<-C $fh> => C<$fh.changed>
82+
C<-M $fh> => C<$fh.modified>
83+
C<-A $fh> => C<$fh.accessed>
84+
C<-C $fh> => C<$fh.changed>
8585
8686
The remaining filetests in Perl 5 do not appear to be implemented
8787
in Perl 6.
@@ -130,8 +130,8 @@ find a true analog.
130130
Available as a function as well as being able to be used as a method.
131131
For instance, these are equivalent:
132132
133-
C<atan2(100)>
134-
C<100.atan2>
133+
C<atan2(100)>
134+
C<100.atan2>
135135
136136
=head2 bind
137137
@@ -229,8 +229,8 @@ Similar to the Perl 5 version, coerces the target to an integer, and uses that
229229
as a Unicode code point to return the relevant character. Can be used as a
230230
function and a method:
231231
232-
C<chr(65); # "A">
233-
C<65.chr; # "A">
232+
C<chr(65); # "A">
233+
C<65.chr; # "A">
234234
235235
=head2 chroot
236236
@@ -389,8 +389,8 @@ shell($command);>
389389
390390
In Perl 6, this is not a function, but an adverb:
391391
392-
C<%hash{$key}:exists;>
393-
C<@array[$i]:exists;>
392+
C<%hash{$key}:exists;>
393+
C<@array[$i]:exists;>
394394
395395
=head2 exit
396396
@@ -879,9 +879,9 @@ deals with newlines. Details at L<http://doc.perl6.org/routine/open>.
879879
880880
Not a builtin function in Perl 6. You would use the IO::Path class:
881881
882-
C<my $dir = IO::Path.new("directory")>
882+
C<my $dir = IO::Path.new("directory")>
883883
884-
C<my $dir = "directory".IO; # Same, but probably more direct>
884+
C<my $dir = "directory".IO; # Same, but probably more direct>
885885
886886
=head2 ord
887887
@@ -1013,9 +1013,9 @@ L<append method|/type/Array#method_append>.
10131013
10141014
These survive the transition to Perl 6. Some notes:
10151015
1016-
C<q/.../> is still equivalent to using single quotes.
1017-
C<qq/.../> is still equivalent to using double quotes.
1018-
C<qw/.../> is more commonly rendered as C<< <...> >> in Perl 6.
1016+
C<q/.../> is still equivalent to using single quotes.
1017+
C<qq/.../> is still equivalent to using double quotes.
1018+
C<qw/.../> is more commonly rendered as C<< <...> >> in Perl 6.
10191019
10201020
There are some added quoting constructs and equivalents, as explained at
10211021
L<http://doc.perl6.org/language/quoting>.
@@ -1364,41 +1364,41 @@ also now works as a method: C<"a;b;c".split(';')>
13641364
13651365
Works as in Perl 5. The formats currently available are:
13661366
1367-
% a literal percent sign
1368-
c a character with the given codepoint
1369-
s a string
1370-
d a signed integer, in decimal
1371-
u an unsigned integer, in decimal
1372-
o an unsigned integer, in octal
1373-
x an unsigned integer, in hexadecimal
1374-
e a floating-point number, in scientific notation
1375-
f a floating-point number, in fixed decimal notation
1376-
g a floating-point number, in %e or %f notation
1377-
X like x, but using uppercase letters
1378-
E like e, but using an uppercase "E"
1379-
G like g, but with an uppercase "E" (if applicable)
1367+
% a literal percent sign
1368+
c a character with the given codepoint
1369+
s a string
1370+
d a signed integer, in decimal
1371+
u an unsigned integer, in decimal
1372+
o an unsigned integer, in octal
1373+
x an unsigned integer, in hexadecimal
1374+
e a floating-point number, in scientific notation
1375+
f a floating-point number, in fixed decimal notation
1376+
g a floating-point number, in %e or %f notation
1377+
X like x, but using uppercase letters
1378+
E like e, but using an uppercase "E"
1379+
G like g, but with an uppercase "E" (if applicable)
13801380
13811381
Compatibility:
13821382
1383-
i a synonym for %d
1384-
D a synonym for %ld
1385-
U a synonym for %lu
1386-
O a synonym for %lo
1387-
F a synonym for %f
1383+
i a synonym for %d
1384+
D a synonym for %ld
1385+
U a synonym for %lu
1386+
O a synonym for %lo
1387+
F a synonym for %f
13881388
13891389
Perl 5 (non-)compatibility:
13901390
1391-
n produces a runtime exception
1392-
p produces a runtime exception
1391+
n produces a runtime exception
1392+
p produces a runtime exception
13931393
13941394
There are modifiers for integers, but they're mainly no-ops, as the
13951395
semantics aren't settled:
13961396
1397-
h interpret integer as native "short" (typically int16)
1398-
l interpret integer as native "long" (typically int32 or int64)
1399-
ll interpret integer as native "long long" (typically int64)
1400-
L interpret integer as native "long long" (typically uint64)
1401-
q interpret integer as native "quads" (typically int64 or larger)
1397+
h interpret integer as native "short" (typically int16)
1398+
l interpret integer as native "long" (typically int32 or int64)
1399+
ll interpret integer as native "long long" (typically int64)
1400+
L interpret integer as native "long long" (typically uint64)
1401+
q interpret integer as native "quads" (typically int64 or larger)
14021402
14031403
=head2 sqrt
14041404

doc/Language/5to6-perlop.pod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ In list context, C<..> operates as the range operator and should not
168168
need to be changed. That said, there are exclusionary range operators
169169
that may be useful. These are:
170170
171-
infix ..^ Excludes endpoint. C<1..^5; # 1 2 3 4 >
172-
infix ^.. Excludes startpoint. C<1^..5; # 2 3 4 5>
173-
infix ^..^ Excludes both start- and endpoint. C<1^..^5; # 2 3 4>
174-
prefix ^ From 0, excludes endpoint. C<^5; # 0 1 2 3 4>
171+
infix ..^ Excludes endpoint. C<1..^5; # 1 2 3 4 >
172+
infix ^.. Excludes startpoint. C<1^..5; # 2 3 4 5>
173+
infix ^..^ Excludes both start- and endpoint. C<1^..^5; # 2 3 4>
174+
prefix ^ From 0, excludes endpoint. C<^5; # 0 1 2 3 4>
175175
176176
In scalar context, C<..> and C<...> work as flip-flop operators in Perl
177177
5, but are little-known, and probably even less used. Those operations

doc/Language/5to6-perlvar.pod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ This is somewhat unclear. It probably depends on what you mean by "the name of
211211
the operating system" as S28 has three different suggestions, all of which
212212
give different answers. On my OS X machine at this time...
213213
214-
C<$*KERNEL> gives "darwin (14.3.0)"
215-
C<$*DISTRO> gives "macosx (10.10.3)"
214+
C<$*KERNEL> gives "darwin (14.3.0)"
215+
C<$*DISTRO> gives "macosx (10.10.3)"
216216
217217
Using C<.version> on either of those will give you just the version
218218
number. C<.name> gives the kernel or distro name. Those objects contain

0 commit comments

Comments
 (0)