0

I have created a perl modul with 3 submodules. I want to create a makefile with MakeMaker and have a problem.

My structure of my module is /module.pm and /module/sub.pm.

If i create the makefile only the module.pm file will be included. Which parameter i need to write in the makemaker so the submodules are included too?

Thank you very much.

1 Answers1

1

Don't put your module in the root directory of your distribution. Instead, create a lib subdirectory and put all the modules under it:

Makefile.PL
lib/module.pm
lib/module/sub.pm

The Makefile.PL should automatically notice all modules under lib. You shouldn't have to change anything except any paths pointing to modules (e.g. VERSION_FROM).

If your module has a prefix, include that under the lib directory. If your module is named Some::Other::Module, you'd have:

Makefile.PL
lib/Some/Other/Module.pm
lib/Some/Other/Module/Sub.pm
cjm
  • 61,471
  • 9
  • 126
  • 175
  • @TobiasToasty, then show more details. Show us your Makefile.PL. Show us your whole directory structure. Show us the output from `make`. – cjm Oct 27 '14 at 20:42
  • After i added the submodules to the manifest everything works fine. Thank you so much :) – Tobias Toasty Oct 28 '14 at 21:12