G'day reverendmred,

Welcome to the Monastery.

"Now, Perl6 has changed all the rules."

I wasn't certain if you were clear on this, so, just to clarify the situation, Perl6 is not the latest version, or a simple update, of Perl5. They are different languages, with their own syntaxes. Except in the most trivial cases, you can't run Perl5 source as Perl6, or vice versa. Here's an example of the level of triviality that I'm talking about:

$ perl -e 'print "Hello, world!\n"' Hello, world! $ perl6 -e 'print "Hello, world!\n"' Hello, world! $

Perl6 has many similarities to Perl5, but they're not the same language. See https://docs.perl6.org/language/5to6-nutshell ("Perl 5 to Perl 6, in a nutshell: How do I do what I used to do?"). There's a number of other 5to6-* links in https://docs.perl6.org/language.html ("Perl 6 Language Documentation").

Perl6 is considered a sister language to Perl5 (see https://perl6.org/). Perl5 is the language to (continue to) choose for robust, production-grade code.

"Once long ago, we used the top of the file to point the script at the executable."

Long ago, and still today! That's called the shebang line. You could use either of these as the first line of your Perl script:

#!/usr/bin/env perl #!/usr/bin/env perl6
"... if you had good OO like Perl5 code, there should be no problem running it alongside new Perl6 code ..."

Yes, you can have both Perl5 and Perl6 code in the same source. See https://github.com/rakudo-p5/v5 for example code; follow links therein for further details.

"So, is there a way we can fork projects and modules on CPAN?"

Not really my area of expertise; however, https://modules.perl6.org/ has links to information about creating modules for Perl6.

— Ken


In reply to Re: Perl6: Choosing language version in the shebang line? by kcott
in thread Perl6: Choosing language version in the shebang line? by reverendmred

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.