Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:

Hi All,

Help!

I just upgraded Fedora from 30 to 31.

I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
from https://github.com/nxadm/rakudo-pkg/releases

Now P6 can not find my subs inside my modules:

# perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
     ===SORRY!=== Error while compiling -e
     Undeclared name:
     PrintGreen used at line 1

[editorial comment] HHH! [/editorial comment]

The stock "rakudo" and "rakudo-zef" that resides in the
Fedora repo's has the same issue.

Many thanks,
-T


Follow up:

Fedora 31 became hard nosed about my mistakes.  Tom
called it.

I had thought all my modules used "unit module MyModule;", but
into everyone life a little humility must fall, not all of them were. 
They are now.


And everyone that imported things suddenly demanded I
use :some-key nicknames, which makes my code a lot
easier to maintain.

Everything is behaving now.  Thank you!

-T

Lets hope my modules still like the position of the moon
when it goes down!

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 2:28 AM, Tom Browder wrote:
One thing I noticed, you are missing a line at the top of your modules 
that should read something like "unit module MyModule;", and the 
export(:some-key) is okay.


Hi Tom,

I had thought all my moduels used "unit module MyModule;", but
into everyone life a little humility must fall, not all of them were. 
They are now.


And everyone that imported things suddenly demanded I
use :some-key nicknames.

Everything is behaving now.  Thank you!

-T


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 6:45 AM, Tom Browder wrote:

If you have much more trouble, I would file a bug with the FC folks.


That is in the works.  I am wait from some good ammunition
from the git folks.


Re: env?

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 8:40 AM, Andy Bach wrote:

 At the top of all my Perl 6 programs, I place
 #!/usr/bin/env perl6

 So I decided to run env by itself and see what I got:

 $ /usr/bin/env perl6
 You may want to `zef install Readline` or `zef install
 Linenoise` or use rlwrap for a line editor

 To exit type 'exit' or '^D'

 Is this suppose to happen?


Yes. The "shebang" line
#!/usr/bin/env perl6

means "use the env to find the perl6 exe and run it" just as:
#!/usr/local/bin/perl6

does, only that's more specific.  So, you're seeing P6 in interactive 
mode, and it's advising you that w/o Linenoise or Readline, you won't be 
able to use "" etc for editing in interactive mode.

$ man env
NAME
        env - run a program in a modified environment

You can do
$ which perl6
to see where the exe might be found, too.


Thank you!

I had to use find to located it.  Then I created links.

# ls -s /opt/rakudo-pkg/bin/zef   /usr/bin/zef
# ls -s /opt/rakudo-pkg/bin/perl6 /usr/bin/perl6

Then which found it.

I use env exclusively as the Fedora repo and git use
different paths and I never know what one my customers
are using


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 6:45 AM, Tom Browder wrote:

In the future, with paying customers, I would some careful testing
before upgrading the OS. It has sure bitten me in the past!


Hi Tom,

I never do.

This computer is a mock up of their configuration.  It does
to get released to then until it works here.

I have two customer's server waiting for this one to
pass muster.  And I will run it for at leat a month
before pulling the trigger on them

So far, I have figured out the changes in dhcpd, the
new ports used by bind (SPT and DPT are no longer
identical), unbuggered bind-chroot, SELinux
and named conflict, qemu and version rising,
and "dnf system-upgrade" issues.

Perl 6 is the last item on the list.  I hope.

Life in the fast lane!

Thank you for all your help!
-T


Re: env?

2019-11-04 Thread Andy Bach
> At the top of all my Perl 6 programs, I place
> #!/usr/bin/env perl6
>
> So I decided to run env by itself and see what I got:
>
>   $ /usr/bin/env perl6
>   You may want to `zef install Readline` or `zef install
>   Linenoise` or use rlwrap for a line editor
>
>   To exit type 'exit' or '^D'
>
> Is this suppose to happen?

Yes. The "shebang" line
 #!/usr/bin/env perl6

means "use the env to find the perl6 exe and run it" just as:
#!/usr/local/bin/perl6

does, only that's more specific.  So, you're seeing P6 in interactive mode, and 
it's advising you that w/o Linenoise or Readline, you won't be able to use "" etc for editing in interactive mode.
$ man env
NAME
   env - run a program in a modified environment

You can do
$ which perl6
to see where the exe might be found, too.

From: ToddAndMargo via perl6-users 
Sent: Sunday, November 3, 2019 11:26 PM
To: perl6-users 
Subject: env?

Hi All,

Fedora 13 (Linux)
rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm

At the top of all my Perl 6 programs, I place
#!/usr/bin/env perl6

So I decided to run env by itself and see what I got:

  $ /usr/bin/env perl6
  You may want to `zef install Readline` or `zef install
  Linenoise` or use rlwrap for a line editor

  To exit type 'exit' or '^D'

Is this suppose to happen?

Many thanks,
-T


--
~~
When you say, "I wrote a program that
crashed Windows," people just stare at
you blankly and say, "Hey, I got those
with the system, for free."
  -- Linus Torvalds
~~


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 7:40 AM ToddAndMargo via perl6-users
 wrote:
...

> I really think this is a Fedora 31 issue and not a Perl issue.
> And really want to keep my rpm database intact.

Ok, then please deal with @nxdm on the issue you filed. Using the git
interface is best I believe.

If you have much more trouble, I would file a bug with the FC folks.

In the future, with paying customers, I would some careful testing
before upgrading the OS. It has sure bitten me in the past!

Good luck!

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 5:19 AM, Tom Browder wrote:

On Mon, Nov 4, 2019 at 6:59 AM Tom Browder  wrote:

I'm using almost latest master:

$ ./perl6-m -v
This is Rakudo version 2019.07-447-gc745d6b10 built on MoarVM version
2019.07.1-309-g48491b896
implementing Perl 6.d.

And I can run our test sandbox with no problems--weird!

Back to my system-wide Perl 6 which is:
This is Rakudo Star version 2019.03.1 built on MoarVM version 2019.03
implementing Perl 6.d.

Can you please try installing that version (2019.03.1) by package and
run our sandbox tests again?

If that still doesn't work, how would you feel about trying to install
Perl 6 (Raku) from source? 


I really think this is a Fedora 31 issue and not a Perl issue.
And really want to keep my rpm database intact.

Keep in mind that this issue did not occur in Fedora 330
running rakudo-pkg-Fedora30-2019.07.1-03.x86_64.rpm

I wish

https://github.com/nxadm/rakudo-pkg/releases/tag/v2019.07.1-03

was not allergic to posting his SRPM's.

https://github.com/nxadm/rakudo-pkg/issues/58



It would (1) be a good experience and (2)
help troubleshoot your problem.

-Tom



[root@rn6 6]# dnf remove rakudo-pkg

[root@rn6 6]# dnf install rakudo-pkg-Fedora29-2019.03.1-01.x86_64.rpm

[root@rn6 6]# perl6 -v
This is Rakudo version 2019.03.1 built on MoarVM version 2019.03
implementing Perl 6.d.

[root@rn6 mytest]# cat test.pl6
#!/usr/bin/env perl6
use lib ;
use A :A; A

[root@rn6 mytest]# test.pl6
WARNINGS for /home/linuxutil/mytest/./test.pl6:
Useless use of constant value A in sink context (line 3)

I am restoring the current version


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 6:59 AM Tom Browder  wrote:

I'm using almost latest master:

$ ./perl6-m -v
This is Rakudo version 2019.07-447-gc745d6b10 built on MoarVM version
2019.07.1-309-g48491b896
implementing Perl 6.d.

And I can run our test sandbox with no problems--weird!

Back to my system-wide Perl 6 which is:
This is Rakudo Star version 2019.03.1 built on MoarVM version 2019.03
implementing Perl 6.d.

Can you please try installing that version (2019.03.1) by package and
run our sandbox tests again?

If that still doesn't work, how would you feel about trying to install
Perl 6 (Raku) from source? It would (1) be a good experience and (2)
help troubleshoot your problem.

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 4:59 AM, Tom Browder wrote:
On Mon, Nov 4, 2019 at 06:52 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:

...

Okay, that's sounding more like an FC/package interface issue. I'm going 
to check my latest build of Rakudo against our little test sandbox and 
see what happens.


In the meantime, why don't you try putting my original test command 
inside a file and run it as a script and see how that works.


-Tom


[root@rn6 mytest]# cat test.pl6
#!/usr/bin/env perl6
use lib ;
use A :A; A

[root@rn6 mytest]# test.pl6
WARNINGS for /home/linuxutil/mytest/./test.pl6:
Useless use of constant value A in sink context (line 3)


And too much information:

[root@rn6 mytest]# cat test.pl6
#!/opt/rakudo-pkg/bin/perl6
use lib ;
use A :A; A

[root@rn6 mytest]# test.pl6
WARNINGS for /home/linuxutil/mytest/./test.pl6:
Useless use of constant value A in sink context (line 3)


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 06:52 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:
...

Okay, that's sounding more like an FC/package interface issue. I'm going to
check my latest build of Rakudo against our little test sandbox and see
what happens.

In the meantime, why don't you try putting my original test command inside
a file and run it as a script and see how that works.

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 04/11/2019 03:56, ToddAndMargo via perl6-users wrote:

On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:

Hi All,

Help!

I just upgraded Fedora from 30 to 31.

I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
from https://github.com/nxadm/rakudo-pkg/releases

Now P6 can not find my subs inside my modules:

# perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
  ===SORRY!=== Error while compiling -e
  Undeclared name:
  PrintGreen used at line 1

[editorial comment] HHH! [/editorial comment]

The stock "rakudo" and "rakudo-zef" that resides in the
Fedora repo's has the same issue.

Many thanks,
-T



I am hamstrung on so may fronts if I don't get this working!

I gets uglier:

# cat p6lib/ModuleTest.pm6
sub ModuleTest() is export( :ModuleTest ) { say "Hi"; }
sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }


# perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst;
ModuleTest; ModuleTst;'

===SORRY!=== Error while compiling -e
Undeclared name:
     ModuleTst used at line 1


And way uglier.  I removed the ":"
# cat p6lib/ModuleTest.pm6

# sub ModuleTest() is export( :ModuleTest ) { say  "Hi"; }
# sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
sub ModuleTest() is export( ModuleTest ) { say  "Hi"; }
sub ModuleTst()  is export( ModuleTst )  { say "Bye"; }


# perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest;
ModuleTst;'
===SORRY!=== Error while compiling
/home/linuxutil/p6lib/ModuleTest.pm6 (ModuleTest)
Undeclared name:
     ModuleTest used at line 4

And, And, depending on the position of the moon overhead,
sometimes it works.    AAAHHH!


On 11/4/19 4:48 AM, Timo Paulssen wrote:
> Todd,
>
> can you please double-check if putting a comma in between the
> :import-tags in the "use" statement makes a difference? Like this:
>
> # perl6 -I./p6lib -e 'use ModuleTest :ModuleTest, :ModuleTst;
> ModuleTest; ModuleTst; # correct'
> # perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst; ModuleTest;
> ModuleTst;  # missing the comma'
>
> it should look like in the first line, the comma right between
> :ModuleTest and :ModuleTst
>
> Thanks
>- Timo
>


$ perl6 -I./p6lib -e 'use ModuleTest :ModuleTest, :ModuleTst; 
ModuleTest; ModuleTst; # correct'

===SORRY!=== Error while compiling -e
Undeclared name:
ModuleTest used at line 4

[tony@rn6 linuxutil]$ perl6 -I./p6lib -e 'use ModuleTest :ModuleTest 
:ModuleTst; ModuleTest; ModuleTst;  # missing the comma'

===SORRY!=== Error while compiling -e
Undeclared name:
ModuleTest used at line 4


Re: FC31 can't find my module subs

2019-11-04 Thread Timo Paulssen
Todd,

can you please double-check if putting a comma in between the
:import-tags in the "use" statement makes a difference? Like this:

# perl6 -I./p6lib -e 'use ModuleTest :ModuleTest, :ModuleTst;
ModuleTest; ModuleTst; # correct'
# perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst; ModuleTest;
ModuleTst;  # missing the comma'

it should look like in the first line, the comma right between
:ModuleTest and :ModuleTst

Thanks
  - Timo

On 04/11/2019 03:56, ToddAndMargo via perl6-users wrote:
> On 11/3/19 3:15 PM, ToddAndMargo via perl6-users wrote:
>> Hi All,
>>
>> Help!
>>
>> I just upgraded Fedora from 30 to 31.
>>
>> I upgraded to rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm
>> from https://github.com/nxadm/rakudo-pkg/releases
>>
>> Now P6 can not find my subs inside my modules:
>>
>> # perl6 -I/home/linuxutil/p6lib -MPrintColors -e 'PrintGreen( "Hi\n" );'
>>  ===SORRY!=== Error while compiling -e
>>  Undeclared name:
>>  PrintGreen used at line 1
>>
>> [editorial comment] HHH! [/editorial comment]
>>
>> The stock "rakudo" and "rakudo-zef" that resides in the
>> Fedora repo's has the same issue.
>>
>> Many thanks,
>> -T
>
>
> I am hamstrung on so may fronts if I don't get this working!
>
> I gets uglier:
>
> # cat p6lib/ModuleTest.pm6
> sub ModuleTest() is export( :ModuleTest ) { say "Hi"; }
> sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
>
>
> # perl6 -I./p6lib -e 'use ModuleTest :ModuleTest :ModuleTst;
> ModuleTest; ModuleTst;'
>
> ===SORRY!=== Error while compiling -e
> Undeclared name:
>     ModuleTst used at line 1
>
>
> And way uglier.  I removed the ":"
> # cat p6lib/ModuleTest.pm6
>
> # sub ModuleTest() is export( :ModuleTest ) { say  "Hi"; }
> # sub ModuleTst()  is export( :ModuleTst )  { say "Bye"; }
> sub ModuleTest() is export( ModuleTest ) { say  "Hi"; }
> sub ModuleTst()  is export( ModuleTst )  { say "Bye"; }
>
>
> # perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest;  ModuleTest;
> ModuleTst;'
> ===SORRY!=== Error while compiling
> /home/linuxutil/p6lib/ModuleTest.pm6 (ModuleTest)
> Undeclared name:
>     ModuleTest used at line 4
>
> And, And, depending on the position of the moon overhead,
> sometimes it works.    AAAHHH!


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 4:47 AM, Tom Browder wrote:
On Mon, Nov 4, 2019 at 06:25 ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:

...

Okay, now we're getting somewhere! That's just a warning, but it runs. I 
am running an older version of Perl 6 (Raku) than you, so I don't get 
the warning.


My issue repeats in all of these versions
under Fedroa 31:

rakudo-pkg-Fedora29-2018.11-01.x86_64.rpm
rakudo-pkg-Fedora29-2019.03.1-01.x86_64.rpm
rakudo-pkg-Fedora30-2019.03.1-03.x86_64.rpm
rakudo-pkg-Fedora30-2019.07.1-03.x86_64.rpm
rakudo-pkg-Fedora31-2019.07.1-03.x86_64.rpm




For the next step, try two things:

1. Run almost the same command but add an empty '()' after the last 'A'.

2. Run almost the same command with an ampersand in front of the 'A' and 
no '()'.


Results?

-Tom



[root@rn6 mytest]# perl6 -e 'use lib ; use A :A; A()'
WARNINGS for -e:
Useless use of constant value A() in sink context (line 1)

[root@rn6 mytest]# perl6 -e 'use lib ; use A :A; '
WARNINGS for -e:
Useless use of  in sink context (line 1)


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 06:25 ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:
...

Okay, now we're getting somewhere! That's just a warning, but it runs. I am
running an older version of Perl 6 (Raku) than you, so I don't get the
warning.

For the next step, try two things:

1. Run almost the same command but add an empty '()' after the last 'A'.

2. Run almost the same command with an ampersand in front of the 'A' and no
'()'.

Results?

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 3:42 AM, Tom Browder wrote:

On Mon, Nov 4, 2019 at 04:44 ToddAndMargo via perl6-users
 wrote:
...

Todd, please don't be so careless in what you show us. It's difficult
to zero in on your problem.  Do me a favor and go to a clean, empty
directory somewhere named 'mytest', and create EXACTLY what I describe
here:

+ create a sub-directory named 'lib'
+ in the sub-directory create two files named 'A.pm6' and 'B.pm6'
+ the contents of 'A.pm6':

 unit module A;
 sub A is export(:A) { say "A" }
 sub B is export(:B) { say "B" }

+ the contents of 'B.pm6':

 unit module B;
 sub A is export(:A) { say "A" }
 sub B is export(:B) { say "B" }

+ back in directory 'mytest' run the following command
 and you should get the same results I do: a single 'A'.

$ perl6 -e 'use lib ; use A :A; A'
A

Please show EXACTLY your command and the results, with no other
comment (and please DON'T TOP POST).

And do not make ANY changes to the test setup described above until I
ask you to.

-Tom




Hi Tom,

If you ever catch me top posting, please dope slap me!

Here you go.

Thank you for the h elp!

-T


# mkdir -p mytest/lib
# cd mytest

[root@rn6 mytest]# ls -aF lib
./  ../  A.pm6  B.pm6

# cat lib/A.pm6
unit module A;
sub A is export(:A) { say "A" }
sub B is export(:B) { say "B" }

# cat lib/B.pm6
unit module B;
sub A is export(:A) { say "A" }
sub B is export(:B) { say "B" }

[root@rn6 mytest]# perl6 -e 'use lib ; use A :A; A'
WARNINGS for -e:
Useless use of constant value A in sink context (line 1)

[root@rn6 mytest]# ls -aF lib
./  ../  A.pm6  B.pm6  .precomp/


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 04:44 ToddAndMargo via perl6-users
 wrote:
...

Todd, please don't be so careless in what you show us. It's difficult
to zero in on your problem.  Do me a favor and go to a clean, empty
directory somewhere named 'mytest', and create EXACTLY what I describe
here:

+ create a sub-directory named 'lib'
+ in the sub-directory create two files named 'A.pm6' and 'B.pm6'
+ the contents of 'A.pm6':

unit module A;
sub A is export(:A) { say "A" }
sub B is export(:B) { say "B" }

+ the contents of 'B.pm6':

unit module B;
sub A is export(:A) { say "A" }
sub B is export(:B) { say "B" }

+ back in directory 'mytest' run the following command
and you should get the same results I do: a single 'A'.

$ perl6 -e 'use lib ; use A :A; A'
A

Please show EXACTLY your command and the results, with no other
comment (and please DON'T TOP POST).

And do not make ANY changes to the test setup described above until I
ask you to.

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 2:28 AM, Tom Browder wrote:
On Mon, Nov 4, 2019 at 02:25 JJ Merelo > wrote:




El lun., 4 nov. 2019 a las 8:35, ToddAndMargo via perl6-users
(mailto:perl6-users@perl.org>>) escribió:


Problem still occurs with selinux disabled


One thing I noticed, you are missing a line at the top of your modules 
that should read something like "unit module MyModule;", 


My actual modules all have this

and the 
export(:some-key) is okay.


But then, in the calling programs, use them something like this:

use lib ;     # MyModule.pm6 is in this dir
use MyModule :some-key1, :some-key2; # note comma


This is my favorite method as it is far easier to maintain



HTH,

-Tom


Hi Tom,

I tried it both ways.  No joy.  But twice everything
started working, but then died again.  What did Fedora
31 do?

Thank you for the help!
-T


--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: FC31 can't find my module subs

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/4/19 12:24 AM, JJ Merelo wrote:



El lun., 4 nov. 2019 a las 8:35, ToddAndMargo via perl6-users 
(mailto:perl6-users@perl.org>>) escribió:



Problem still occurs with selinux disabled


selinux operates at a higher level. This is plain and simple not having 
the write bit set for your particular user.


Anyway, try this (as a regular user)

* Create a META6.json metadata file for every module, or a bunch of 
them, using the classic module layout (in a lib/ directory from root).

That is

/-- META6.json
     lib/
    MyModule.pm6

Make sure that MyModule.p6 is actually declared that way.
* zef test . (always a good idea too, including writing those self same 
tests)

* zef install . (zef will run tests too, so you double check).

That's the advised way to proceed always when you're developing a 
module. Once installed, you can use your modules from anywhere and, 
since they are in the default location, no need to use lib or -I.


BTW, that's clearly specified in the official documentation for modules 
https://docs.raku.org/language/modules

--
JJ


Hi JJ,

Not seeing the point, especially since I DO NOT want other
to see my code when I migrate it to my various customer's servers.  I 
also do not want others to see my code on this (LUKS encrypted) computer 
either.  On my customer's

servers, all my code  and directories are hidden to
everyone but root.  (The owner of the company gets a
list all users and passwords, as it is his property,
not mine.)

And everything I have installed with zef is working so far.

What write bit?  User root and group users can write
just fine to that directory.

# ls -al p6lib
total 84
drwxrwxr-x.  4 tony users  4096 Nov  3 23:12 .

They even can create a .precomp:


With this, everyone can write to it (I set it back afterwards)

[root@rn6 linuxutil]# chmod 2777 p6lib
[root@rn6 linuxutil]# perl6 -I/home/linuxutil/p6lib -e 'use ModuleTest; 
ModuleTest; ModuleTst;'
===SORRY!=== Error while compiling /home/linuxutil/p6lib/ModuleTest.pm6 
(ModuleTest)

Undeclared name:
ModuleTest used at line 4

This is a read issue.  P6 can read the file, but can
not process the subs correctly.

And it is not a Perl6 issue either.  The exact perl
(rakudo-pkg-Fedora30-2019.07.1-03.x86_64.rpm) I ran
on Fedora 30 has the same issue under Fedora 31.

What did Fedora 31 do?   AHH!!

-T


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 02:25 JJ Merelo  wrote:

>
>
> El lun., 4 nov. 2019 a las 8:35, ToddAndMargo via perl6-users (<
> perl6-users@perl.org>) escribió:
>
>>
>> Problem still occurs with selinux disabled
>
>
One thing I noticed, you are missing a line at the top of your modules that
should read something like "unit module MyModule;", and the
export(:some-key) is okay.

But then, in the calling programs, use them something like this:

use lib ; # MyModule.pm6 is in this dir
use MyModule :some-key1, :some-key2; # note comma

HTH,

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread JJ Merelo
El lun., 4 nov. 2019 a las 8:35, ToddAndMargo via perl6-users (<
perl6-users@perl.org>) escribió:

>
> Problem still occurs with selinux disabled
>
>
selinux operates at a higher level. This is plain and simple not having the
write bit set for your particular user.

Anyway, try this (as a regular user)

* Create a META6.json metadata file for every module, or a bunch of them,
using the classic module layout (in a lib/ directory from root).
That is

/-- META6.json
lib/
   MyModule.pm6

Make sure that MyModule.p6 is actually declared that way.
* zef test . (always a good idea too, including writing those self same
tests)
* zef install . (zef will run tests too, so you double check).

That's the advised way to proceed always when you're developing a module.
Once installed, you can use your modules from anywhere and, since they are
in the default location, no need to use lib or -I.

BTW, that's clearly specified in the official documentation for modules
https://docs.raku.org/language/modules
-- 
JJ


Re: FC31 can't find my module subs

2019-11-04 Thread JJ Merelo
El lun., 4 nov. 2019 a las 8:52, ToddAndMargo via perl6-users (<
perl6-users@perl.org>) escribió:

> On 11/3/19 11:31 PM, JJ Merelo wrote:
> > Again, running stuff and installing it as root is never a good idea
>
>
> Most of my programs are for system administration and I have
> no choice but to run them as root.
>

You don't have to _develop_ them as root, though. Development, and
everything related to it, up to and including the version of the language
you're using, should never be done with root privileges.


-- 
JJ


Re: env?

2019-11-04 Thread ToddAndMargo via perl6-users

On 11/3/19 10:25 PM, William Michels via perl6-users wrote:

I've seen this message as well. I believe it's the default message you
get when you start up the Perl6 (Raku) REPL, but don't have Readline
or Linenoise installed (or your machine needs help knowing where to
look).

Maybe try 'echo $PATH' at a terminal prompt, and see if your new
machine has the same directory listings as your old machine?

HTH, Bill.




As long as it is "normal".

Thank you!