{"id":3249,"date":"2016-08-03T20:36:49","date_gmt":"2016-08-04T01:36:49","guid":{"rendered":"http:\/\/baselines.com\/?p=3249"},"modified":"2016-08-03T20:36:49","modified_gmt":"2016-08-04T01:36:49","slug":"force-dependencies-in-cpan-install","status":"publish","type":"post","link":"https:\/\/baselines.com\/?p=3249","title":{"rendered":"Force Dependencies in CPAN Install"},"content":{"rendered":"<p>CPAN: Automatically install dependencies without confirmation<br \/>\nJanuary 1, 2009 By Major Hayden 15 Comments<\/p>\n<p>I enjoy using CPAN because it installs Perl modules with a simple interface, fetches dependencies, and warns you when things are about to end badly. However, one of my biggest complaints is when it constantly confirms installing dependencies. While this is an annoyance if you have to install a module with many dependencies (or if you\u2019re working with CPAN on a new server), you can tell CPAN to automatically confirm the installation of dependencies.<\/p>\n<p>To do this, simply bring up a CPAN shell:<\/p>\n<p>perl -MCPAN -e shell<br \/>\n1<br \/>\nperl -MCPAN -e shell<br \/>\nRun these two commands in the CPAN shell:<\/p>\n<p>o conf prerequisites_policy follow<br \/>\no conf commit<br \/>\n1<br \/>\n2<br \/>\no conf prerequisites_policy follow<br \/>\no conf commit<br \/>\nNow, exit the CPAN shell, start the CPAN shell, and try to install a module that you need. All dependencies will be automatically confirmed, downloaded and installed.<\/p>\n<p>The first line sets your dependency policy to follow rather than ask (the default). The second line tells CPAN to write the changes to your user\u2019s CPAN configuration file to make them permanent.<\/p>\n<p>A big thanks goes out to Lee Hambley for the fix.<\/p>\n<p>WARNING: There are some occasions where you would not want to install dependencies from CPAN. Examples of these situations are when your operating system\u2019s package manager (yum, up2date, apt-get, aptitude, etc) has installed Perl modules in an alternative location or when you have manually installed modules in a non-standard way. I\u2019m a Red Hat guy, and these problems rarely arise on Red Hat\/Fedora systems, but your mileage may vary.<\/p>\n\n<script>\nvar zbPregResult = '0';\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>CPAN: Automatically install dependencies without confirmation January 1, 2009 By Major Hayden 15 Comments I enjoy using CPAN because it installs Perl modules with a simple interface, fetches dependencies, and warns you when things are about to end badly. However, one of my biggest complaints is when it constantly confirms installing dependencies. While this is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[265],"tags":[],"class_list":["post-3249","post","type-post","status-publish","format-standard","hentry","category-programming"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/baselines.com\/index.php?rest_route=\/wp\/v2\/posts\/3249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/baselines.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/baselines.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/baselines.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/baselines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3249"}],"version-history":[{"count":1,"href":"https:\/\/baselines.com\/index.php?rest_route=\/wp\/v2\/posts\/3249\/revisions"}],"predecessor-version":[{"id":3250,"href":"https:\/\/baselines.com\/index.php?rest_route=\/wp\/v2\/posts\/3249\/revisions\/3250"}],"wp:attachment":[{"href":"https:\/\/baselines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/baselines.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/baselines.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}