"use" does two things, in both perl 5 and perl 6. It loads definitions from a file, and it imports things marked as exported. (The first can be done separately, the same way in both: "require" instead of "use".)
Normally you will give a file its own namespace with a "module" (perl 5: "package") declaration; in this case, you usually want to import subsequently, which is why "use" combines the two steps. But you can leave off the module declaration in the file you loaded, in which case it loads into the current module and you do not need to import anything because you loaded directly into your current namespace instead. "Import" means you are requesting things in a different namespace to be made available directly in yours. The thing before (the last, if there are multiple) "::"s is the namespace. There is a default namespace, which is where your program will be if you do not specify otherwise. Most, but as I said above not all, modules load into their own namespaces so as to not collide with existing names from other modules; then you can use imports to control which names are brought into your namespace. If you want a name from another namespace, provided it is declared "our", you can use the explicit namespace with the double colons. (Perl 5 defaults all subs to "our". Perl 6 defaults them to "my": you have no choice but to mark these as "is export" and import them, if they are to be visible from outside the file they are in. If your perl 5 is older, you cannot make a "my" sub.) On Sun, Jun 3, 2018 at 10:49 PM ToddAndMargo <toddandma...@zoho.com> wrote: > On 06/03/2018 06:02 PM, Brandon Allbery wrote: > > t doesn't affect export at all. It affects what namespace the original > > name is in. Why would it affect export or import directly? > > > > Although if they end up declared in your existing namespace because you > > didn't include it so it loaded the file in your current namespace, then > > no export or import is needed. (Which, again, is the same as with Perl > 5.) > > When I say "import" I am referring to "use xxxx". Did I trip > across a reserved word in Perl 6? > > Also. You told me the why again, not the ramifications. > Would you mind answer both of the questions? > > I especially would like to know if > use RunNoShell < RunNoShell RunNoShellErr >; > works or how to get it to work > > Thank you for all the help with this! > > -T > -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net