Opened 11 years ago

Last modified 9 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:


script test_mynewmodule.p6 is

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

a file "" 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.

If I put a symlink from 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 9 years ago by szabgab

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