Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change p6 to raku, chg .perl to .raku #3251

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/Language/5to6-nutshell.pod6
Expand Up @@ -1518,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" raku program.p6
$ PERL6LIB="/some/module/lib" raku program.raku

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 @@ -1878,4 +1878,4 @@ live on GitHub. An online converter may become available at some point.

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
# vim: expandtab softtabstop=4 shiftwidth=4 ft=raku
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the problem with massive PRs with many files: there might be one quirk and everything goes tumbling down. In this case, I'm not sure this would work (for those using vim). It might, however.

22 changes: 11 additions & 11 deletions doc/Language/classtut.pod6
Expand Up @@ -667,7 +667,7 @@ defined in the Employee class as though they were from the Programmer class.
=begin code :preamble<class Programmer {}>
my $programmer = Programmer.new(
salary => 100_000,
known_languages => <Perl5 Perl6 Erlang C++>,
known_languages => <Perl5 Raku Erlang C++>,
favorite_editor => 'vim'
);

Expand Down Expand Up @@ -709,8 +709,8 @@ my $cook = Cook.new(
);

$cook.cook( 'pizza' ); # OUTPUT: «Cooking pizza␤»
say $cook.utensils.perl; # OUTPUT: «["spoon", "ladle", "knife", "pan"]␤»
say $cook.cookbooks.perl; # OUTPUT: «["The Joy of Cooking"]␤»
say $cook.utensils.raku; # OUTPUT: «["spoon", "ladle", "knife", "pan"]␤»
say $cook.cookbooks.raku; # OUTPUT: «["The Joy of Cooking"]␤»
say $cook.salary; # OUTPUT: «40000␤»

my $baker = Baker.new(
Expand All @@ -720,8 +720,8 @@ my $baker = Baker.new(
);

$baker.cook('brioche'); # OUTPUT: «Baking a tasty brioche␤»
say $baker.utensils.perl; # OUTPUT: «["self cleaning oven"]␤»
say $baker.cookbooks.perl; # OUTPUT: «["The Baker's Apprentice"]␤»
say $baker.utensils.raku; # OUTPUT: «["self cleaning oven"]␤»
say $baker.cookbooks.raku; # OUTPUT: «["The Baker's Apprentice"]␤»
say $baker.salary; # OUTPUT: «50000␤»
=end code

Expand Down Expand Up @@ -753,7 +753,7 @@ my $geek = GeekCook.new(
books => 'Learning Raku',
utensils => ('stainless steel pot', 'knife', 'calibrated oven'),
favorite_editor => 'MacVim',
known_languages => <Perl6>
known_languages => <Raku>
);

$geek.cook('pizza');
Expand Down Expand Up @@ -807,7 +807,7 @@ my Programmer $o .= new;
if $o ~~ Employee { say "It's an employee" };
say $o ~~ GeekCook ?? "It's a geeky cook" !! "Not a geeky cook";
say $o.^name;
say $o.perl;
say $o.raku;
say $o.^methods(:local)».name.join(', ');
=end code

Expand All @@ -829,13 +829,13 @@ C<GeekCook>.

The call C<$o.^name> tells us the type of C<$o>: in this case C<Programmer>.

C<$o.perl> returns a string that can be executed as Perl code, and
C<$o.raku> returns a string that can be executed as Raku code, and
reproduces the original object C<$o>. While this does not work perfectly in
all cases, it is very useful for debugging simple objects.
N<For example, closures cannot easily be reproduced this way; if you
don't know what a closure is don't worry. Also current implementations have
problems with dumping cyclic data structures this way, but they are expected
to be handled correctly by C<.perl> at some point.>
to be handled correctly by C<.raku> at some point.>
X<|^methods>
C<$o.^methods(:local)> produces a list of L<Method|/type/Method>s that can be
called on C<$o>. The C<:local> named argument limits the returned methods to
Expand All @@ -856,7 +856,7 @@ unsurprisingly returns the class name.
Introspection is very useful for debugging and for learning the language
and new libraries. When a function or method returns an object you don't
know about, by finding its type with C<.^name>, seeing a construction recipe
for it with C<.perl>, and so on, you'll get a good idea of what its return
for it with C<.raku>, and so on, you'll get a good idea of what its return
value is. With C<.^methods>, you can learn what you can do with the class.

But there are other applications too. For instance, a routine that serializes
Expand Down Expand Up @@ -906,4 +906,4 @@ it in a narrative way.

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
# vim: expandtab softtabstop=4 shiftwidth=4 ft=raku