Frage

I've developed a Catalyst application without having regularly added dependencies to Makefile.PL using the requires 'Module::Foo'; way. It was not a problem during development, but now I have to deploy. I have used a lot of modules, it is a pain to do this work.

Is there a common way to parse all the .pm files in lib directory and write it to the Makefile.PL? Is there a reason that each time we use a module, it is not automatically added to the Makefile.PL?

Does somebody would know a kind of Catalyst Helper or anything else that could make the job?

Andere Tipps

You can use Dist::Zilla which has a plugin to detect your prerequisites

http://dzil.org/tutorial/prereq.html

Or you could roll your own and grep your code for use and require statements.

For simpler use case, @climagic recommends :

grep -rh ^use --include="*.pl" --include="*.pm" . | sort | uniq -c

as a solution which is not perfect, but gives you a start on the Perl modules in use.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top