Top «Prev(2004-07-12) Latest Next(2004-07-25)» Edit

pterjan's diary


2004-07-15 ruby-perl

  Use Perl objects within Ruby !

I discovered ruby-perl yesterday and it works quite fine !
irb(main):001:0> require 'perl'
=> true
irb(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
=> PerlObject
irb(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|06|07|08|09|11|
2005|01|02|05|06|07|08|09|10|11|12|
2006|01|02|03|06|08|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|12|
2011|02|04|06|
2012|01|05|11|
2013|01|02|04|06|
2014|02|
2015|06|
2017|05|07|12|