On Sun, Jun 3, 2018 at 6:22 PM ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:
On 06/03/2018 03:07 PM, Brandon Allbery wrote:
> I'm still trying to figure out why you have just "lib" instead of
"use
> lib" there. And why it's not throwing an error.
As poop! I was mixing Perl 5 and Perl 6.
$ p6 'use lib <./>; use RunNoShell; ( my $a, my $b ) =
RunNoShell("ls");
say $a;'
Works
But
$ p6 'use lib <./>; use RunNoShell; ( my $a, my $b ) =
RunNoShell::RunNoShell("ls6"); say $a;'
Could not find symbol '&RunNoShell'
in block <unit> at -e line 1
The syntax `RunNoShell::RunNoShell` comes from Perl 5. Is this
not allows in Perl 6?
On 06/03/2018 03:24 PM, Brandon Allbery wrote:
It is allowed if you have 'unit module RunNoShell;' at the top of
RunNoShell.pm6. Otherwise you defined it in the main namespace and
looking for it in the RunNoShell namespace will fail.
Perl 5 does the same thing fi you omitted 'package RunNoShell;' at the
top of RunNoShell.pm.
The name of the file is `RunNoShell.pm`
It has two exported subs:
sub RunNoShellErr ( $RunString ) is export
sub RunNoShell ( $RunString ) is export
If I place
unit module RunNoShell;
at the top, what happens?
All subs get exported?
Do I have to import them differently
Old way:
use RunNoShell; # qx[ RunNoShell ];