Skip to content

Commit

Permalink
chg p6 to raku
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Feb 24, 2020
1 parent 98a1a09 commit 0aa06f6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions doc/Language/5to6-nutshell.pod6
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
=SUBTITLE How do I do what I used to do? (Raku in a nutshell)
Note: Some references to
Perl 6 still apply in the Raku infrastructure, but the changeover
from the name Perl 6 to Raku is ongoing and the references will be
changed as soon as they become operative in the latest release of Raku
(and some volunteer changes them!).
This page attempts to provide a fast-path to the changes in syntax and
semantics from Perl 5 to Raku. Whatever worked in Perl 5 and must be
written differently in Raku, should be listed here (whereas many
Expand Down Expand Up @@ -97,7 +103,7 @@ $object->$methodname(@args); # Perl 5
$object."$methodname"(@args); # Raku
If you leave out the quotes, then Raku expects C<$methodname> to contain
a C<Method> object, rather than the simple string name of the method. Yes,
a C<Method> object rather than the simple string name of the method. Yes,
B<everything> in Raku can be considered an object.
=head2 Whitespace
Expand Down Expand Up @@ -1386,9 +1392,9 @@ Switch parsing is now done by the parameter list of the C<MAIN> subroutine.
}
=for code :lang<shell>
perl6 example.p6 --xyz=5
raku example.p6 --xyz=5
5
perl6 example.p6 -xyz=5
raku example.p6 -xyz=5
5
=item C<-t>
Expand Down Expand Up @@ -1512,7 +1518,7 @@ In Raku this is similar, one merely needs to change a number! As you
probably guessed, you just need to use X<C<PERL6LIB>|PERL6LIB>:
=for code :lang<shell>
$ PERL6LIB="/some/module/lib" perl6 program.p6
$ PERL6LIB="/some/module/lib" raku program.p6
In Perl 5 one uses the ':' (colon) as a directory separator for C<PERL5LIB>, but
in Raku one uses the ',' (comma). For example:
Expand Down Expand Up @@ -1809,15 +1815,15 @@ perl example.pl --length=abc
=end code
=begin code :lang<shell>
perl6 example.p6
raku example.p6
24
file.dat
Verbosity off
perl6 example.p6 --file=foo --length=42 --verbose
raku example.p6 --file=foo --length=42 --verbose
42
foo
Verbosity on
perl6 example.p6 --length=abc
raku example.p6 --length=abc
Usage:
c.p6 [--length=<Int>] [--file=<Any>] [--verbose]
=end code
Expand Down

0 comments on commit 0aa06f6

Please sign in to comment.