# File lib/automateit/package_manager/cpan.rb, line 51 def installed?(*packages) return _installed_helper?(*packages) do |list, opts| perl = opts[:perl] || self.perl cmd = "#{perl} #{CPAN_WRAPPER} --query #{list.join(' ')}" # FIXME if CPAN isn't configured, this will hang because Perl will demand input log.debug(PEXEC+cmd) output = `#{cmd}` output.sub!(/.*---(\s[^\n]+)?\n/m, '') struct = ::YAML.load(output) struct["available"] || [] end end