develooper Front page | perl.perl6.users | Postings from December 2019

USE'ing a symlinked module causes a MOAR error

From:
Richard Hainsworth
Date:
December 20, 2019 23:25
Subject:
USE'ing a symlinked module causes a MOAR error
Message ID:
b7bec422-22ef-e144-a284-4c97d73b1227@gmail.com
I have a MOARV error when USE'ing a module that is symlinked to a local 
`lib` directory.

So I have the following in my directory tree:

raku-A/lib/

                 A.pm6

raku-B/lib/

                 B.pm6

                 (symlink to A.pm6)

raku-B/t/

             01-basic.t


In B.pm6 , I have

```

use A;

# more code

```

In 01-basic.t:

```

use B;

...

```

Running the following from `raku-B/`

```

prove -ve 'raku -Ilib'

```

causes the error:

t/01-basic.t .. Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to 
something meaningful.
   in any statement_control at 
/opt/rakudo-pkg/share/perl6/lib/Perl6/Grammar.moarvm line 1
Use of uninitialized value of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to 
something meaningful.
   in any statement_control at 
/opt/rakudo-pkg/share/perl6/lib/Perl6/Grammar.moarvm line 1
===SORRY!===
Cannot resolve caller new(IO::Path:U: Any:U, :CWD(Str)); none of these 
signatures match:


However, if instead of using a symlink, I copy the contents of A.pm6 
into Raku-B/lib, then the moarvm error disappears.

Is this a bug? Or is it a part of the raku design, (I think I remember 
reading somewhere that cross-directory access is constrained).

If it is a part of the design, how can I work around it other than by 
copying the contents of the module?

Regards,

Richard



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About