This post originated from an RSS feed registered with Ruby Buzz
by Daniel Berger.
Original Post: Getting Perl chocolate in my Ruby peanut butter
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Who says Ruby and Perl can't be buds? Take a look at this Perl module created by Yuichi Tateno. With it, you can talk to Ruby drb servers with Perl:
use strict;
use Inline::Ruby::dRuby::Client;
use Inline::Ruby qw/rb_iter/; # use ruby's iter
my $ruby_obj = Inline::Ruby::dRuby::Client->new('druby://localhost:10001')
ruby_obj->ruby_method();
rb_iter($ruby_obj, sub {
my $arg = shift;
return $arg * $arg;
})->each;
# If ruby's code..
ruby_obj.each {|arg|
return arg * arg
}