Running mod_perl on El capitan
For Mac OS X, /Library/WebServer/CGI-Executables has already setup, so there should be no configuration. So, just copying echo.pl in the directory, and use the perl script with localhost/cgi-bin/echo.pl. 

To make it work anyway

We need a ModPerl::PerlRun to install the CPAN module before the compilation. 

sudo cpan ModPerl::PerlRun


This also creates and installs the perl_mod.so, but this breaks the apache, so we need to rebuild the module. This is the working configuration.

LoadModule perl_module libexec/apache2/mod_perl.so

&lt;Location "/Library/WebServer/Documents/cgi/"&gt;
    Options ExecCGI
    Order allow,deny
    Allow from all
&lt;/Location&gt;

&lt;Files ~ "\.(pl|cgi)$"&gt;
    SetHandler perl-script
    PerlResponseHandler ModPerl::PerlRun
    Options +ExecCGI
    PerlSendHeader On
&lt;/Files&gt;


Now localhost/cgi/echo.pl is the address to access.