Skip to content

Commit

Permalink
Suggests nextsame/nextwidth
Browse files Browse the repository at this point in the history
Which would close #1389. Also eliminates accidental MD, references
issue #2022. Some minor reformatting.
  • Loading branch information
JJ committed May 15, 2018
1 parent ec3ec9e commit e241017
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions doc/Language/5to6-nutshell.pod6
Expand Up @@ -261,7 +261,7 @@ first $coderef, @values, :k;
=begin item
C<&foo;> I<and> C<goto &foo;> I<for re-using the caller's argument list /
replacing the caller in the call stack>. Perl 6 can use L<C<callsame>|/language/functions#index-entry-dispatch_callsame> for re-dispatching
replacing the caller in the call stack>. Perl 6 can use either L<C<callsame>|/language/functions#index-entry-dispatch_callsame> for re-dispatching or L<C<nextsame>|/language/functions#index-entry-dispatch_nextsame> and L<C<nextwitch>|/language/functions#index-entry-dispatch_nextwith>, which have no exact equivalent in Perl 5.
=begin comment
# TODO: Suggest .nextsame and .nextwith once they've been implemented in Rakudo.
Expand All @@ -275,9 +275,16 @@ sub foo { say "before"; bar(|@_); say "after" } # Perl 6 - have to be explicit
=for code :lang<perl5>
sub foo { say "before"; goto &bar } # Perl 5
=for code
proto foo (|) {*}; multi foo ( Any $n ) { say "Any"; say $n; }; multi foo ( Int $n ) { say "Int"; callsame; }; foo(3); # /language/functions#index-entry-dispatch_callsame
=begin code
proto foo (|) {*};
multi foo ( Any $n ) {
say "Any"; say $n;
};
multi foo ( Int $n ) {
say "Int"; callsame;
};
foo(3); # /language/functions#index-entry-dispatch_callsame
=end code
=end item
Expand Down Expand Up @@ -1716,11 +1723,11 @@ Larry Wall's own code for translating Perl 5 to Perl 6 has bit-rotted, and
is not (currently) viable on recent releases of Perl 5.
MAD (Misc Attribute Definition) is a configuration option when building
Perl from a source distribution. The `perl` executable analyses and
Perl from a source distribution. The C<perl> executable analyses and
translates your Perl sourcecode into an op-tree, and then executes the
program by walking the op-tree. Normally, most of the details from the
analysis are thrown away during this process. When MAD is enabled, the
`perl` executable will save those details to an XML file, which can then be
C<perl> executable will save those details to an XML file, which can then be
read and further processed into Perl 6 code by a MAD parser.
Please consult #perl6 to find out the best release of Perl 5 to use for
Expand Down

0 comments on commit e241017

Please sign in to comment.