irb(main):001:0> require 'perl'=> trueirb(main):002:0> perl_obj = Perl.new("-MLibconf::Glueconf::Networking::Resolv", "-e", "0")=> #<Perl:0x402b3754>irb(main):003:0> resolv=perl_obj.eval("new Libconf::Glueconf::Networking::Resolv('/etc/resolv.conf');")=> Libconf::Glueconf::Networking::Resolv=HASH(0x820d488)irb(main):004:0> resolv.class=> PerlObjectirb(main):005:0> resolv.writeConf('/tmp/resolv.conf')=>I still have a few problems with it but I think writing Ruby bindings for Libconf will be really trivial.I also found a ruby-python but I currently don't need it.
2004-07-14
Use Perl objects within Ruby !
I discovered ruby-perl yesterday and it works quite fine !
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment