Sha256: 1bf643bec51e65a9496e1b748388c963eacb525c55429c1b78ff329e383cc45e

Contents?: true

Size: 1.05 KB

Versions: 7

Compression:

Stored size: 1.05 KB

Contents

#
# Author:: Joshua Timberman (<joshua@opscode.com>)
# Copyright:: Copyright (c) 2008 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

provides "languages/perl"

require_plugin "languages"
output = nil

perl = Mash.new
status = popen4("perl -V:version -V:archname") do |pid, stdin, stdout, stderr|
  stdin.close
  stdout.each do |line|
    case line
    when /^version=\'(.+)\';$/: perl[:version] = $1
    when /^archname=\'(.+)\';$/: perl[:archname] = $1
    end
  end
end

if status == 0
  languages[:perl] = perl 
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rightscale-ohai-0.3.3.1 lib/ohai/plugins/perl.rb
rightscale-ohai-0.3.3.2 lib/ohai/plugins/perl.rb
rightscale-ohai-0.3.3.3 lib/ohai/plugins/perl.rb
ohai-0.5.0 lib/ohai/plugins/perl.rb
ohai-0.4.0 lib/ohai/plugins/perl.rb
ohai-0.3.6 lib/ohai/plugins/perl.rb
ohai-0.3.4 lib/ohai/plugins/perl.rb