Hi Nele,
Nele Kosog wrote:
Here is what I am trying to do:
I would like to use "pp -o program.exe my_program.pl" in my_project
folder to create an executable:
my_project/
- my_program.pl
- my_module.pm
- my_sub_folder/
o my_other_module.pm
My problem is:
pp and the resulting program.exe can't locate "my_module.pm".
It dies saying
[...]
I tried the following commands in directory my_project but the error
messages doesn't change:
pp -M my_module.pm -o program.exe my_program.pl
pp -M my_project::my_module -o program.exe my_program.pl
pp -l ./ -o program.exe my_program.pl
The -l is only for shared libraries (dlls).
The -M takes a module name, not a file name. So the "-M my_module.pm" is
wrong.
You want this:
pp -I . -o my_program.exe my_program.pl
Or possibly
pp -I . -I my_sub_folder -o my_program.exe my_program.pl
The latter applies if you want to load "use my_other_module" and not
"use my_sub_folder::my_other_module".
If you don't load some modules explicitly in your program (and neither
in the modules it loads), then you may have to add a few -M directives.
Again, -M takes module names, not file names. Thus also the "-I PATH"
options.
Best regards,
Steffen