{"id":2499,"date":"2017-12-08T12:15:01","date_gmt":"2017-12-08T12:15:01","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2499"},"modified":"2025-02-01T23:08:01","modified_gmt":"2025-02-01T23:08:01","slug":"installing-perl-modules","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/installing-perl-modules\/","title":{"rendered":"Installing Perl modules"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Installing Perl modules<\/strong><\/p>\n<p>Perl modules may be installed using the CPAN module or from source.<br \/>\nCPAN method<\/p>\n<p>perl -MCPAN -e shell (to get an interactive CPAN shell)<br \/>\nperl -MCPAN -e &#8216;install Time::JulianDay&#8217; (if you know the name of the module, you can install it directly without interacting with the CPAN shell)<\/p>\n<p>Within the CPAN shell:<br \/>\ni \/expression\/ will search for a Perl module containing expression, and<br \/>\ninstall module will install the module.<\/p>\n<p>Example:<br \/>\nperl -MCPAN -e shell<br \/>\ni \/JulianDay\/<br \/>\ninstall Time::JulianDay<\/p>\n<p>Note: if you are behind a firewall, you may wish to use passive FTP with Perl&#8217;s Net::FTP module. Set the environment variable FTP_PASSIVE 1 (or any non-zero value) to use passive FTP when downloading Perl modules through CPAN.<\/p>\n<p>Manual installation<\/p>\n<p>To manually install a Perl module:<\/p>\n<p>1. Download the Perl module from CPAN or other site.<br \/>\n2. Extract the tarball.<br \/>\n3. Run perl Makefile.PL<br \/>\n4. Run make<br \/>\n5. Run make test<br \/>\n6. Run make install<\/p>\n<p>Note: you should use the same compiler to build Perl modules that you used to build Perl. For example, if you are building Perl modules with gcc and are using a version of Perl that was supplied with your distribution (ex. Solaris 8 includes Perl 5.005_03), you may run into errors.<\/p>\n<p>Checking for existence of a Perl module<br \/>\nAn easy way to check for the existence of a Perl module on your system (technically, in Perl&#8217;s @INC array, a list of directories Perl searches when attempting to load modules) is to run perl -e &#8216;use module;&#8217;<\/p>\n<p>Example:<\/p>\n<p>perl -e &#8216;use HTML::Parser;&#8217;<\/p>\n<p>Regards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Installing Perl modules Perl modules may be installed using the CPAN module or from source. CPAN method perl -MCPAN -e shell (to get an interactive CPAN shell) perl -MCPAN -e &#8216;install Time::JulianDay&#8217; (if you know the name of the module, you can install it directly without interacting with the CPAN shell)&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[14],"tags":[175],"class_list":["post-2499","post","type-post","status-publish","format-standard","hentry","category-perl","tag-perl"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2499"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2499\/revisions"}],"predecessor-version":[{"id":2500,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2499\/revisions\/2500"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}