Suppose I have 2 files in a directory
p.pl
Mod.pm
In perl5 I can load a module Mod.pm from p.pl via:
use FindBin qw($Bin);
use lib "$Bin";
...
use Mod;
I wonder what the Raku equivalent would be (if files are p.raku and Mod.rakumod)?
What I want to accomplish is to load a module relative to a script.
- I want to execute without setting an env variable prior to starting a script.
- I dont want to install the modules with zef.
- I dont want to be
forced to set the cwd to the scripts directory, meaning if p.raku and Mod.rakumod are in directory d1 that is in turn in directory d0 I want to be able to run
cd d0; rakudo d1/p.rakuas well ascd d1; rakudo p.raku