Can a Perl script install its own CPAN dependencies?

Each of the standard build paradigms has their own way of specifying dependencies. In all of these cases, the build process will attempt to install your dependencies, automatically in some contexts. In ExtUtils::MakeMaker, you pass a hash reference in the PREREQ_PM field to WriteMakefile: # Makefile.PL for My::Module use ExtUtils::MakeMaker; WriteMakefile ( NAME => ‘My::Module’, … Read more

How do I choose a package name for a custom Perl module that does not collide with builtin or CPAN packages names?

The namespace Local:: has been reserved for just this purpose. No module that starts with that prefix will be accepted to CPAN or the core. Alternatively, you can use an underscore in the top-level name (like My_Corp::Session or just My_Session). All categories with an underscore have also been reserved. (This is mentioned in perlmodlib, under … Read more