Hi Steffen, Hi everybody! The "-I" switch didn't work. I had to put the modules in my camelbox/site/lib directory to make it compile the executable. When I run it, I get a new error saying it could not load the driver class 'Rose::DB::Pg' which I use in my modules. It is installed and located in camelbox/site/lib/Rose/DB/Pg.pm - which should be ok.
I tried to update Module::ScanDeps, but the CPAN shell says it's up to date. What else can I try to make it work? Thank you in advance! Best regards, Nele -----Original Message----- From: Steffen Mueller [mailto:smuel...@cpan.org] Sent: Montag, 4. Januar 2010 13:35 To: Nele Kosog Cc: par@perl.org Subject: Re: Cannot locate own modules 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