Automate Installation of Perl Modules Using Cpanminus Manager
This manifest will help you to install perl libraries directly from cpan, You can set you cpan local repository or you can use any cpan mirror out there.
All I did is created a defination to install the perl libraries from cpan repository.
Terminal
123456789101112131415
# Install perl modules from cpanclasscpan{package{['perl-YAML-Perl','perl-Error','perl-CPAN-DistnameInfo','perl-CPAN-Meta-Check','perl-File-pushd','perl-local-lib','perl-Module-CPANfile','perl-App-cpanminus','perl-aliased','make']:ensure=>present}defineperl($cpan_repo="http://mirror.teklinks.com/CPAN/"){exec{"$name":command=>"cpanm --mirror $cpan_repo --mirror-only $name",require=>Package["make","perl-App-cpanminus"],unless=>"perldoc -l $name"}} # End of cpan_perl} #End of perl