Skip to content

Commit

Permalink
install/upgrade patchperl/cpanm in default recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Jan 6, 2012
1 parent 8091528 commit 2caabcb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cookbooks/perlbrew/README.md
Expand Up @@ -32,8 +32,9 @@ Recipes
perlbrew
----------

Installs/updates perlbrew. This is required for use of the LWRP. Optionally
installs perls specified in the `node['perlbrew']['perls']` attribute list.
Installs/updates perlbrew along with patchperl and cpanm. This is required for
use of the LWRP. Optionally installs perls specified in the
`node['perlbrew']['perls']` attribute list.

Resources/Providers
===================
Expand Down
9 changes: 7 additions & 2 deletions cookbooks/perlbrew/recipes/default.rb
Expand Up @@ -30,9 +30,13 @@

# if we have perlbrew, upgrade it
# XXX is this really a good idea?
execute "perlbrew self-upgrade" do
bash "perlbrew self-upgrade" do
environment ({'PERLBREW_ROOT' => perlbrew_root})
command "#{perlbrew_bin} self-upgrade"
code <<-EOC
#{perlbrew_bin} self-upgrade
#{perlbrew_bin} -f install-patchperl
#{perlbrew_bin} -f install-cpanm
EOC
only_if {::File.exists?(perlbrew_bin)}
end

Expand All @@ -43,6 +47,7 @@
code <<-EOC
curl -kL http://install.perlbrew.pl > perlbrew-install
source perlbrew-install
#{perlbrew_root}/bin/perlbrew -f install-cpanm
EOC
not_if {::File.exists?(perlbrew_bin)}
end
Expand Down

0 comments on commit 2caabcb

Please sign in to comment.