ruby-perl 04.01.2011 → 04.01.2011.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/perl/ffi_lib.rb +9 -1
  2. metadata +1 -1
data/lib/perl/ffi_lib.rb CHANGED
@@ -5,7 +5,7 @@ module Perl
5
5
  require 'perl/internal'
6
6
  extend FFI::Library
7
7
 
8
- klass.ffi_lib Perl::FFILib::shlib
8
+ Perl::FFILib::load(klass)
9
9
 
10
10
  # PERL_SYS_INIT3()
11
11
  attach_function 'Perl_sys_init3', [:int, :pointer, :pointer], :void
@@ -63,6 +63,14 @@ module Perl
63
63
  end
64
64
 
65
65
  private
66
+ def self.load(klass)
67
+ begin
68
+ klass.ffi_lib Perl::FFILib::shlib
69
+ rescue Exception
70
+ klass.ffi_lib "/usr/lib/libperl.#{so_ext}"
71
+ end
72
+ end
73
+
66
74
  def self.archlib
67
75
  `perl -MConfig -e 'print $Config{archlib}'`
68
76
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ruby-perl
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 04.01.2011
5
+ version: 04.01.2011.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Andrea Campi