So now, what are the solutions to the problem when you want or need additional modules or to be more up to date with your Perl runtime environment?
The real important difference between Perl 5 and Perl 6, is the way use works. In Perl 5, use is global. In Perl 6, use is lexical.

This means that only in the lexical scope where a use command is executed, will you be able to "see" the module having been loaded. In other words: each lexical scope has its own "universe" of code. Only if you need to have two different versions of the same module(name) in the same lexical scope, do you need to provide an alias for one of them (in that scope only, of course).

This also means that installed modules of different authors and different versions, will be installed side-by-side: there is no possibility of collision in the installation of modules.

So, if you have a piece of code that you know works with version 1.20 of module Foo, you probably should specify that:

use Foo:ver<1.20>;
If this is part of your own module in a distribution, you should make sure that the META6.json file in that distribution, so indicates the dependency on that version of the distribution in which that module lives. An installer will then install the necessary files side-by-side with any other module Foo that is installed (if it isn't installed already).

In conclusion: the problems that Perl 5 has with versioning of installed modules and dependencies, simply do not (have to) exist in Perl 6: if you are clear in what you need, the system will provide it to you without interfering with anything else.

For more information, see s22 as it is currently evolving.


In reply to Re^4: Unexpected Python News by liz
in thread Unexpected Python News by McA

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.