Skip to content

Commit 3bff9ad

Browse files
committed
More indentation for better web rendering
1 parent 601a8f0 commit 3bff9ad

File tree

1 file changed

+47
-47
lines changed

1 file changed

+47
-47
lines changed

doc/Language/5to6-perlfunc.pod

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ 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
@@ -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

0 commit comments

Comments
 (0)