<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.leaky.org/index.php?action=history&amp;feed=atom&amp;title=Perl%2FLocal</id>
		<title>Perl/Local - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.leaky.org/index.php?action=history&amp;feed=atom&amp;title=Perl%2FLocal"/>
		<link rel="alternate" type="text/html" href="https://wiki.leaky.org/index.php?title=Perl/Local&amp;action=history"/>
		<updated>2026-04-24T19:01:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.leaky.org/index.php?title=Perl/Local&amp;diff=355&amp;oldid=prev</id>
		<title>Leaky: added package requirements!</title>
		<link rel="alternate" type="text/html" href="https://wiki.leaky.org/index.php?title=Perl/Local&amp;diff=355&amp;oldid=prev"/>
				<updated>2018-02-22T22:46:48Z</updated>
		
		<summary type="html">&lt;p&gt;added package requirements!&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:46, 22 February 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Installing a local copy of Perl and libraries (using local::lib) is the recommended way of setting up an environment for developing a web application. It means you don't need to be root to install more modules, and the modules can be specific versions rather than whatever happens to be available as (often out of date) packages for the operating system.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Installing a local copy of Perl and libraries (using local::lib) is the recommended way of setting up an environment for developing a web application. It means you don't need to be root to install more modules, and the modules can be specific versions rather than whatever happens to be available as (often out of date) packages for the operating system.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Ensure you have installed various development packages first!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; yum install -y patch gcc-c++ gcc&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following script can be copied/pasted into a shell script and run. This will build a local version of Perl 5.24.1 (edit PERLVERSION for a different version) and install some of the key modules. After it has finished, you'll need to use ''cpanm ModuleName'' to install any additional modules. Depending on the environment, you may find this takes a while - for example Catalyst::Devel and dependencies can be 20-30 minutes!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following script can be copied/pasted into a shell script and run. This will build a local version of Perl 5.24.1 (edit PERLVERSION for a different version) and install some of the key modules. After it has finished, you'll need to use ''cpanm ModuleName'' to install any additional modules. Depending on the environment, you may find this takes a while - for example Catalyst::Devel and dependencies can be 20-30 minutes!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Leaky</name></author>	</entry>

	<entry>
		<id>https://wiki.leaky.org/index.php?title=Perl/Local&amp;diff=344&amp;oldid=prev</id>
		<title>Leaky: Better than perlbrew for a production system</title>
		<link rel="alternate" type="text/html" href="https://wiki.leaky.org/index.php?title=Perl/Local&amp;diff=344&amp;oldid=prev"/>
				<updated>2017-08-27T15:43:02Z</updated>
		
		<summary type="html">&lt;p&gt;Better than perlbrew for a production system&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Installing a local copy of Perl and libraries (using local::lib) is the recommended way of setting up an environment for developing a web application. It means you don't need to be root to install more modules, and the modules can be specific versions rather than whatever happens to be available as (often out of date) packages for the operating system.&lt;br /&gt;
&lt;br /&gt;
The following script can be copied/pasted into a shell script and run. This will build a local version of Perl 5.24.1 (edit PERLVERSION for a different version) and install some of the key modules. After it has finished, you'll need to use ''cpanm ModuleName'' to install any additional modules. Depending on the environment, you may find this takes a while - for example Catalyst::Devel and dependencies can be 20-30 minutes!&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/usr/bin/env bash&lt;br /&gt;
&lt;br /&gt;
LOCALDIR=${HOME}/local/&lt;br /&gt;
PERLVERSION=5.24.1&lt;br /&gt;
PERLINSTALLTARGETDIR=${LOCALDIR}perl-${PERLVERSION}&lt;br /&gt;
PERLBUILDURL=https://raw.githubusercontent.com/tokuhirom/Perl-Build/master/perl-build&lt;br /&gt;
CPANMURL=http://cpanmin.us/&lt;br /&gt;
LOCALPERL=${PERLINSTALLTARGETDIR}/bin/perl${PERLVERSION}&lt;br /&gt;
LOCALEXEC=${LOCALDIR}exec&lt;br /&gt;
RUNTESTS=--notest&lt;br /&gt;
PERLJOBS=9&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Installing Perl ${PERLVERSION}&amp;quot;&lt;br /&gt;
curl ${PERLBUILDURL} | perl - --jobs ${PERLJOBS} ${RUNTESTS} --noman ${PERLVERSION} ${PERLINSTALLTARGETDIR}&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Bootstrapping local::lib&amp;quot;&lt;br /&gt;
curl -L ${CPANMURL} | perl - -l ${LOCALDIR} local::lib&lt;br /&gt;
eval $(perl -I${LOCALDIR}lib/perl5 -Mlocal::lib=--deactivate-all); \&lt;br /&gt;
        curl -L ${CPANMURL} | ${LOCALPERL} - -L ${LOCALDIR} ${RUNTESTS} --reinstall \&lt;br /&gt;
        local::lib App::cpanminus App::local::lib::helper&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Creating exec program (for cron etc)&amp;quot;&lt;br /&gt;
cat &amp;gt; ${LOCALEXEC} &amp;lt;&amp;lt;EOF&lt;br /&gt;
#!/usr/bin/env bash&lt;br /&gt;
eval \$(perl -I${LOCALDIR}lib/perl5 -Mlocal::lib=--deactivate-all)&lt;br /&gt;
source ${LOCALDIR}bin/localenv-bashrc&lt;br /&gt;
PATH=${LOCALDIR}bin:${PERLINSTALLTARGETDIR}/bin:\$PATH&lt;br /&gt;
export PATH&lt;br /&gt;
exec  &amp;quot;\$@&amp;quot;&lt;br /&gt;
EOF&lt;br /&gt;
chmod 755 ${LOCALEXEC}&lt;br /&gt;
&lt;br /&gt;
# For running commands within the normal shell&lt;br /&gt;
cat &amp;gt;&amp;gt; $HOME/.bash_profile &amp;lt;&amp;lt;EOF&lt;br /&gt;
eval \$(perl -I${LOCALDIR}lib/perl5 -Mlocal::lib=--deactivate-all)&lt;br /&gt;
source ${LOCALDIR}bin/localenv-bashrc&lt;br /&gt;
export PATH=${LOCALDIR}bin:${PERLINSTALLTARGETDIR}/bin:\$PATH&lt;br /&gt;
EOF&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When running a Perl script via cron (scheduled tasks), use the local/exec script to execute it. For example:&lt;br /&gt;
&lt;br /&gt;
 10 * * * *      $HOME/local/exec $HOME/application/my_perl_script.pl&lt;br /&gt;
&lt;br /&gt;
If using Apache to serve pages that rely on the local version of Perl, add the following to the relevant Apache config.&lt;br /&gt;
&lt;br /&gt;
 SetEnv PATH /home/'''www'''/local/bin:/home/'''www'''/local/perl-5.24.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin&lt;br /&gt;
 SetEnv PERL5LIB /home/'''www'''/local/lib/perl5&lt;/div&gt;</summary>
		<author><name>Leaky</name></author>	</entry>

	</feed>