diff options
author | H.Merijn Brand <h.m.brand@xs4all.nl> | 2020-05-28 14:38:52 +0200 |
---|---|---|
committer | Sawyer X <xsawyerx@cpan.org> | 2020-05-30 17:37:16 +0300 |
commit | 17b35041bdff13ad8301eae5df5f75578f910ce1 (patch) | |
tree | 6f3d9b27e113332f2f77eea3f4bf176f9781d466 | |
parent | 975363793fa0bd4d9ce6722102e009c479ecf506 (diff) | |
download | perl-17b35041bdff13ad8301eae5df5f75578f910ce1.tar.gz |
Perl 6 -> Raku where appropriate
-rw-r--r-- | Porting/todo.pod | 4 | ||||
-rw-r--r-- | ext/mro/mro.pm | 2 | ||||
-rw-r--r-- | lib/feature.pm | 4 | ||||
-rw-r--r-- | pod/perlcheat.pod | 4 | ||||
-rw-r--r-- | pod/perlcommunity.pod | 6 | ||||
-rw-r--r-- | pod/perliol.pod | 2 | ||||
-rw-r--r-- | pod/perlootut.pod | 2 | ||||
-rw-r--r-- | pod/perlpolicy.pod | 2 | ||||
-rw-r--r-- | pod/perlre.pod | 4 | ||||
-rw-r--r-- | pod/perlsyn.pod | 20 | ||||
-rw-r--r-- | pp.c | 4 | ||||
-rwxr-xr-x | regen/feature.pl | 4 |
12 files changed, 29 insertions, 29 deletions
diff --git a/Porting/todo.pod b/Porting/todo.pod index 3df408ff2f..b2047e92f2 100644 --- a/Porting/todo.pod +++ b/Porting/todo.pod @@ -952,9 +952,9 @@ Currently this is illegal: state ($a, $b) = foo(); -In Perl 6, C<state ($a) = foo();> and C<(state $a) = foo();> have different +In Raku, C<state ($a) = foo();> and C<(state $a) = foo();> have different semantics, which is tricky to implement in Perl 5 as currently they produce -the same opcode trees. The Perl 6 design is firm, so it would be good to +the same opcode trees. The Raku design is firm, so it would be good to implement the necessary code in Perl 5. There are comments in C<Perl_newASSIGNOP()> that show the code paths taken by various assignment constructions involving state variables. diff --git a/ext/mro/mro.pm b/ext/mro/mro.pm index d094c02080..e927dc1c55 100644 --- a/ext/mro/mro.pm +++ b/ext/mro/mro.pm @@ -89,7 +89,7 @@ resolution order under multiple inheritance. It was first introduced in the language Dylan (see links in the L</"SEE ALSO"> section), and then later adopted as the preferred MRO (Method Resolution Order) for the new-style classes in Python 2.3. Most recently it has been adopted as the -"canonical" MRO for Perl 6 classes, and the default MRO for Parrot objects +"canonical" MRO for Raku classes, and the default MRO for Parrot objects as well. =head2 How does C3 work diff --git a/lib/feature.pm b/lib/feature.pm index e6f467e9e4..94c80d05a5 100644 --- a/lib/feature.pm +++ b/lib/feature.pm @@ -135,7 +135,7 @@ disable I<all> features (an unusual request!) use C<no feature ':all'>. =head2 The 'say' feature -C<use feature 'say'> tells the compiler to enable the Perl 6 style +C<use feature 'say'> tells the compiler to enable the Raku style C<say> function. See L<perlfunc/say> for details. @@ -159,7 +159,7 @@ explicitly disabled the warning: no warnings "experimental::smartmatch"; -C<use feature 'switch'> tells the compiler to enable the Perl 6 +C<use feature 'switch'> tells the compiler to enable the Raku given/when construct. See L<perlsyn/"Switch Statements"> for details. diff --git a/pod/perlcheat.pod b/pod/perlcheat.pod index 73b4679a72..0bdc392c14 100644 --- a/pod/perlcheat.pod +++ b/pod/perlcheat.pod @@ -83,7 +83,7 @@ people had useful suggestions. Thank you, Perl Monks. A special thanks to Damian Conway, who didn't only suggest important changes, but also took the time to count the number of listed features and make a -Perl 6 version to show that Perl will stay Perl. +Raku version to show that Perl will stay Perl. =head1 AUTHOR @@ -99,7 +99,7 @@ L<https://perlmonks.org/?node_id=216602> - the original PM post =item * -L<https://perlmonks.org/?node_id=238031> - Damian Conway's Perl 6 version +L<https://perlmonks.org/?node_id=238031> - Damian Conway's Raku version =item * diff --git a/pod/perlcommunity.pod b/pod/perlcommunity.pod index 51b7110abb..aa142868b9 100644 --- a/pod/perlcommunity.pod +++ b/pod/perlcommunity.pod @@ -39,9 +39,9 @@ own IRC network, L<irc://irc.perl.org>. General (not help-oriented) chat can be found at L<irc://irc.perl.org/#perl>. Many other more specific chats are also hosted on the network. Information about irc.perl.org is located on the network's website: L<https://www.irc.perl.org>. For a more help-oriented #perl, -check out L<irc://irc.freenode.net/#perl>. Perl 6 development also has a -presence in L<irc://irc.freenode.net/#perl6>. Most Perl-related channels will -be kind enough to point you in the right direction if you ask nicely. +check out L<irc://irc.freenode.net/#perl>. Raku development also has a +presence in L<irc://irc.freenode.net/#raku-dev>. Most Perl-related channels +will be kind enough to point you in the right direction if you ask nicely. Any large IRC network (Dalnet, EFnet) is also likely to have a #perl channel, with varying activity levels. diff --git a/pod/perliol.pod b/pod/perliol.pod index b70a510aad..a4bb7d674f 100644 --- a/pod/perliol.pod +++ b/pod/perliol.pod @@ -21,7 +21,7 @@ maintain (source) compatibility. The aim of the implementation is to provide the PerlIO API in a flexible and platform neutral manner. It is also a trial of an "Object Oriented -C, with vtables" approach which may be applied to Perl 6. +C, with vtables" approach which may be applied to Raku. =head2 Basic Structure diff --git a/pod/perlootut.pod b/pod/perlootut.pod index d7474b4b4d..b11f628e8e 100644 --- a/pod/perlootut.pod +++ b/pod/perlootut.pod @@ -466,7 +466,7 @@ of Perl as "the first postmodern computer language". C<Moose> provides a complete, modern OO system. Its biggest influence is the Common Lisp Object System, but it also borrows ideas from Smalltalk and several other languages. C<Moose> was created by Stevan -Little, and draws heavily from his work on the Perl 6 OO design. +Little, and draws heavily from his work on the Raku OO design. Here is our C<File> class using C<Moose>: diff --git a/pod/perlpolicy.pod b/pod/perlpolicy.pod index c358d6a4f1..0bcb4d5024 100644 --- a/pod/perlpolicy.pod +++ b/pod/perlpolicy.pod @@ -26,7 +26,7 @@ words, it's your usual mix of technical people. Over this group of porters presides Larry Wall. He has the final word in what does and does not change in any of the Perl programming languages. -These days, Larry spends most of his time on Perl 6, while Perl 5 is +These days, Larry spends most of his time on Raku, while Perl 5 is shepherded by a "pumpking", a porter responsible for deciding what goes into each release and ensuring that releases happen on a regular basis. diff --git a/pod/perlre.pod b/pod/perlre.pod index 8c0d2049e0..0a9e8ec21d 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -2829,7 +2829,7 @@ As a shortcut C<(*MARK:I<NAME>)> can be written C<(*:I<NAME>)>. =item C<(*THEN)> C<(*THEN:I<NAME>)> -This is similar to the "cut group" operator C<::> from Perl 6. Like +This is similar to the "cut group" operator C<::> from Raku. Like C<(*PRUNE)>, this verb always matches, and when backtracked into on failure, it causes the regex engine to try the next alternation in the innermost enclosing group (capturing or otherwise) that has alternations. @@ -2865,7 +2865,7 @@ backtrack and try I<C>; but the C<(*PRUNE)> verb will simply fail. =item C<(*COMMIT)> C<(*COMMIT:I<arg>)> X<(*COMMIT)> -This is the Perl 6 "commit pattern" C<< <commit> >> or C<:::>. It's a +This is the Raku "commit pattern" C<< <commit> >> or C<:::>. It's a zero-width pattern similar to C<(*SKIP)>, except that when backtracked into on failure it causes the match to fail outright. No further attempts to find a valid match by advancing the start pointer will occur again. diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index 89a68ce888..81270f13f6 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -636,7 +636,7 @@ right), you can say use feature "switch"; to enable an experimental switch feature. This is loosely based on an -old version of a Perl 6 proposal, but it no longer resembles the Perl 6 +old version of a Raku proposal, but it no longer resembles the Raku construct. You also get the switch feature whenever you declare that your code prefers to run under a version of Perl that is 5.10 or later. For example: @@ -707,7 +707,7 @@ Due to an unfortunate bug in how C<given> was implemented between Perl 5.10 and 5.16, under those implementations the version of C<$_> governed by C<given> is merely a lexically scoped copy of the original, not a dynamically scoped alias to the original, as it would be if it were a -C<foreach> or under both the original and the current Perl 6 language +C<foreach> or under both the original and the current Raku language specification. This bug was fixed in Perl 5.18 (and lexicalized C<$_> itself was removed in Perl 5.24). @@ -1199,13 +1199,13 @@ interested in only the first match alone. This doesn't work if you explicitly specify a loop variable, as in C<for $item (@array)>. You have to use the default variable C<$_>. -=head3 Differences from Perl 6 +=head3 Differences from Raku The Perl 5 smartmatch and C<given>/C<when> constructs are not compatible -with their Perl 6 analogues. The most visible difference and least +with their Raku analogues. The most visible difference and least important difference is that, in Perl 5, parentheses are required around the argument to C<given()> and C<when()> (except when this last one is used -as a statement modifier). Parentheses in Perl 6 are always optional in a +as a statement modifier). Parentheses in Raku are always optional in a control construct such as C<if()>, C<while()>, or C<when()>; they can't be made optional in Perl 5 without a great deal of potential confusion, because Perl 5 would parse the expression @@ -1233,7 +1233,7 @@ this works in Perl 5: say "that's all, folks!"; -But it doesn't work at all in Perl 6. Instead, you should +But it doesn't work at all in Raku. Instead, you should use the (parallelizable) C<any> operator: if any(@primary) eq "red" { @@ -1245,11 +1245,11 @@ use the (parallelizable) C<any> operator: } The table of smartmatches in L<perlop/"Smartmatch Operator"> is not -identical to that proposed by the Perl 6 specification, mainly due to -differences between Perl 6's and Perl 5's data models, but also because -the Perl 6 spec has changed since Perl 5 rushed into early adoption. +identical to that proposed by the Raku specification, mainly due to +differences between Raku's and Perl 5's data models, but also because +the Raku spec has changed since Perl 5 rushed into early adoption. -In Perl 6, C<when()> will always do an implicit smartmatch with its +In Raku, C<when()> will always do an implicit smartmatch with its argument, while in Perl 5 it is convenient (albeit potentially confusing) to suppress this implicit smartmatch in various rather loosely-defined situations, as roughly outlined above. (The difference is largely because @@ -1998,9 +1998,9 @@ static IV S_iv_shift(IV iv, int shift, bool left) /* For left shifts, perl 5 has chosen to treat the value as unsigned for * the * purposes of shifting, then cast back to signed. This is very - * different from perl 6: + * different from Raku: * - * $ perl6 -e 'say -2 +< 5' + * $ raku -e 'say -2 +< 5' * -64 * * $ ./perl -le 'print -2 << 5' diff --git a/regen/feature.pl b/regen/feature.pl index 667f524a7c..2af9b74e4e 100755 --- a/regen/feature.pl +++ b/regen/feature.pl @@ -537,7 +537,7 @@ disable I<all> features (an unusual request!) use C<no feature ':all'>. =head2 The 'say' feature -C<use feature 'say'> tells the compiler to enable the Perl 6 style +C<use feature 'say'> tells the compiler to enable the Raku style C<say> function. See L<perlfunc/say> for details. @@ -561,7 +561,7 @@ explicitly disabled the warning: no warnings "experimental::smartmatch"; -C<use feature 'switch'> tells the compiler to enable the Perl 6 +C<use feature 'switch'> tells the compiler to enable the Raku given/when construct. See L<perlsyn/"Switch Statements"> for details. |