On 10/14/22 3:38 PM, Elizabeth Mattijsen wrote:
On 14 Oct 2022, at 21:15, Joseph Polanik <jpola...@charter.net> wrote:
Actually, I did create a factorial() sub, but that didn't get me out of my present predicament. It works as expected when invoked from the command line. However, when invoked from a test script (or the REPL) the error message is "Undeclared routine".
Could you please run that case with:

$ raku --ll-exception -Idir-with-module test-script

and post the output?
$ raku --ll-exception -Idir-with-module Run/run_SequenceHelper.raku
Undeclared routine:
    factorial used at line 23

   at SETTING::src/core.c/Exception.pm6:64 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/runtime/CORE.c.setting.moarvm:throw)  from gen/moar/Grammar.nqp:4517 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/lib/Perl6/Grammar.moarvm:cry_sorrows)  from gen/moar/Grammar.nqp:838 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/lib/Perl6/Grammar.moarvm:comp_unit)  from gen/moar/Grammar.nqp:553 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/lib/Perl6/Grammar.moarvm:TOP)  from gen/moar/stage2/QRegex.nqp:2267 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/QRegex.moarvm:parse)  from gen/moar/stage2/NQPHLL.nqp:2301 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:parse)  from gen/moar/stage2/NQPHLL.nqp:2217 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:execute_stage)  from gen/moar/stage2/NQPHLL.nqp:2252 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:run)  from gen/moar/stage2/NQPHLL.nqp:2248 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:)  from gen/moar/stage2/NQPHLL.nqp:2244 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:compile)  from gen/moar/stage2/NQPHLL.nqp:1919 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:eval)  from gen/moar/stage2/NQPHLL.nqp:2154 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:evalfiles)  from gen/moar/stage2/NQPHLL.nqp:2114 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:command_eval)  from gen/moar/Compiler.nqp:105 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/lib/Perl6/Compiler.moarvm:command_eval)  from gen/moar/stage2/NQPHLL.nqp:2039 (/home/jpolanik/rakudo-2022.07-01/bin/../share/nqp/lib/NQPHLL.moarvm:command_line)  from gen/moar/rakudo.nqp:140 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/runtime/perl6.moarvm:MAIN)  from gen/moar/rakudo.nqp:1 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/runtime/perl6.moarvm:<mainline>)  from <unknown>:1 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/runtime/perl6.moarvm:<main>)  from <unknown>:1 (/home/jpolanik/rakudo-2022.07-01/bin/../share/perl6/runtime/perl6.moarvm:<entry>)

The script Run/run_SequenceHelper.raku contains only the following lines

use lib '~/Documents/myRaku/gitHub/SequenceHelper/lib';
use SequenceHelper :ALL;
say factorial(5);

Thanks for looking into this.

Joe

Reply via email to