ruby-perl 0.99.15j → 04.01.2011
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.
- data/README.md +13 -0
- data/lib/perl/ffi_lib.rb +14 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -121,3 +121,16 @@ In the previous snippet we first define a Perl `sub` and we assign it to
|
|
121
121
|
the `@func` instance variable; we then call it passing a String. For all
|
122
122
|
intents and purposes, `@func` is now a lambda you can pass around and call,
|
123
123
|
only it's implemented in Perl.
|
124
|
+
|
125
|
+
Bug reports
|
126
|
+
-----------
|
127
|
+
|
128
|
+
ruby-perl is rather well test with RSpec, however you may still find a few
|
129
|
+
bugs. Please report them any [issue](https://github.com/zephirworks/ruby-perl/issues)
|
130
|
+
you may find.
|
131
|
+
|
132
|
+
Copyright and license
|
133
|
+
---------------------
|
134
|
+
|
135
|
+
Copyright (c) 2011 ZephirWorks.
|
136
|
+
This code is released under the MIT license.
|
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
|
8
|
+
klass.ffi_lib Perl::FFILib::shlib
|
9
9
|
|
10
10
|
# PERL_SYS_INIT3()
|
11
11
|
attach_function 'Perl_sys_init3', [:int, :pointer, :pointer], :void
|
@@ -61,5 +61,18 @@ module Perl
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
64
|
+
|
65
|
+
private
|
66
|
+
def self.archlib
|
67
|
+
`perl -MConfig -e 'print $Config{archlib}'`
|
68
|
+
end
|
69
|
+
|
70
|
+
def self.so_ext
|
71
|
+
`perl -MConfig -e 'print $Config{so}'`
|
72
|
+
end
|
73
|
+
|
74
|
+
def self.shlib
|
75
|
+
"#{archlib}/CORE/libperl.#{so_ext}"
|
76
|
+
end
|
64
77
|
end
|
65
78
|
end
|