How To Install/Update CPAN on MacOS Mojave with fatal error: ‘EXTERN.h’ file not found

Author: , June 12th, 2019

The Problem Tried to install the latest version of cpan and got stuck. Tracked it down to the dependency module Mac::SystemDirectory which was failing to build:

The Solution Use the MacOS installer command to deploy the needed files:

The, rerunning the cpan install works:

How To Watch https Calls to Apache 2.4 using Perl and mod_status

Author: , September 5th, 2017

Step 1: Enable Apache status and lock it down: Make sure mod_status is being loaded:

Add support for the call just under the first DocumentRoot statement:

Step 2. Prepare your environment:

Step 3: Create and run the status script: (See the astat contents at the bottom)

/root/astat

How To Configure CPAN to Automatically Install Dependencies Without Confirmation

Author: , March 20th, 2014

perl -MCPAN -e ‘my $c = “CPAN::HandleConfig”; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => “follow”); $c->edit(connect_to_internet_ok => “yes”); $c->edit(build_requires_install_policy => “yes”); $c->commit’

How To Fix CPAN Error Undefined subroutine &IO::Uncompress::Base::readonly

Author: , December 26th, 2013

CPAN Error: Undefined subroutine &IO::Uncompress::Base::readonly called at /usr/lib/perl5/site_perl/5.8.8/IO/Uncompress/Base.pm Looks like CentOS update installs an older version of the Scalar::Util so that Perl could not load the module. Download the Scalar::Util module and manually install it:

To test: perl -MCPAN -e ‘shell’ For more information, visit the CPAN Util.pm page. Original Post: http://www.perlmonks.org/?displaytype=print;node_id=965635;replies=1

How To Configure AWS SES Perl Scripts

Author: , October 27th, 2011

Your mileage may vary widely…

CentOS

Ubuntu

For all OS

How To Calculate Time In Perl Using Date::Manip OO Mode

Author: , March 22nd, 2011

my $now = new Date::Manip::Date; $now->parse(‘now’); # in GMT $now->convert(‘EST5EDT’); # in Eastern time my $then = new Date::Manip::Date; $then->parse(‘200503131131’); # in GMT $then->convert(‘EST5EDT’); # in Eastern time my $delta = $now->calc($then); my @delta = $delta->value(); # get delta values as an array foreach (@delta) { $_ = abs($_); } # remove negative signs my […]

How To Fix Webmin PAM Errors At Startup

Author: , January 30th, 2011

If you are seeing PAM errors in /var/webmin/miniserv.error, then try the following: # yum install pam-devel # cpan Authen::PAM # vim /etc/pam.d/webmin auth include system-auth # service webmin restart Log will now say: PAM authentication enabled instead of : PAM test failed – maybe /etc/pam.d/webmin does not exist

Good Things To Know About CPAN

Author: , November 7th, 2010

install Term::ReadKey install readline install Term::ReadLine

How To Install CPAN on Fedora

Author: , October 19th, 2010

[code]yum install perl-CPAN[/code]

How To Install Multiple Perl Modules From The Command Line

Author: , July 14th, 2010

Create a text file containing the list of desired modules, one per line. Name it “modules.txt”. Then execute this command: for module in cat modules.txt; do echo $module; perl -MCPAN -e “install $module”; done