Opened 5 years ago

Last modified 4 years ago

#695 new defect

Padre not loading perl6 modules in cwd.

Reported by: richardh Owned by:
Priority: major Milestone:
Component: Perl 6 Version: 0.48
Keywords: Cc:

Description

script test_mynewmodule.p6 is

use v6;
use mynewmodule;
coda 'hello world ';

a file "mynewmodule.pm" is in the same directory as "test.p6" with content:

module mynewmodule;
sub coda ($text) is export { say "$text and coda" }

If I change to the script directory and run with
$ perl6 test_mynewmodule.p6

then I get the expected response
hello world and coda

If I load the script into Padre, the syntax checker refuses to accept either 'use mynewmodule' or the function in it.

running a script with the following line in it
for @*INC {.say}

yields the same in both Padre and from the console, viz.
/full/installation/to/rakudo/lots_of_sub_ds/languages/lib
/home/user/.perl/lib
.

If I put a symlink from mynewmodule.pm into /home/user/.perl/lib
then in Padre
a) using F5 gets the correct response
b) the spell checker still refuses to accept the module's existence

This is a bug in Padre and in the perl6 spelling checker.
In Padre, even though the current directory is in @*INC, Padre doesnt seem to recognise the cwd and does not load a module therefrom.
In syntax checker, modules not loading.

A workaround was suggested on #padre by adding extra code. But really I should not need to add any extra code to a perl6 script that works in the console in order for it to work in Padre in the same way as it works when in the terminal.

Change History (1)

comment:1 Changed 4 years ago by szabgab

  • Component changed from editor to Perl 6
Note: See TracTickets for help on using tickets.