Skip to content

Commit

Permalink
perlbrew recipe takes perls attribute to install
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Jan 6, 2012
1 parent fed292c commit d47ea3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions cookbooks/perlbrew/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
#

default['perlbrew']['perlbrew_root'] = '/opt/perlbrew'
default['perlbrew']['perls'] = []

9 changes: 9 additions & 0 deletions cookbooks/perlbrew/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,12 @@
EOC
not_if {::File.exists?(perlbrew_bin)}
end

# were any perls requested in attributes?
if node['perlbrew']['perls']
node['perlbrew']['perls'].each do |p|
perlbrew_perl p do
action :install
end
end
end

0 comments on commit d47ea3d

Please sign in to comment.