Permalink
Browse files

install/upgrade patchperl/cpanm in default recipe

  • Loading branch information...
xdg committed Jan 6, 2012
1 parent 8091528 commit 2caabcbe4040c245aba1285855310a363e456119
Showing with 10 additions and 4 deletions.
  1. +3 −2 cookbooks/perlbrew/README.md
  2. +7 −2 cookbooks/perlbrew/recipes/default.rb
@@ -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
===================
@@ -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
@@ -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

0 comments on commit 2caabcb

Please sign in to comment.