On the off chance that you happen to be a fan of Ruby (and from what I'm hearing, it's worth looking into), you may be interested to know that Neil Watkiss has announced the initial release of Inline::Ruby. You can download it here. He states that the module has a lot of bugs and is incomplete, but he welcomes test cases and patches. Code from his announcement:

use Inline Ruby; my $obj = new Iterator(1, "2", [3], {4 => 5}); $obj->each_iter(sub { use Data::Dumper; my $element = shift; print "It looks like Ruby passed me this: ", Dumper($element); }); __END__ __Ruby__ class Iterator def initialize(*elements) @elements = elements end def each @elements.each { |x| yield x } end end

Output:

ttul:~/dev/cpan/Inline-Ruby$ perl -Mblib t.pl Using /home/nwatkiss/dev/cpan/Inline-Ruby/blib It looks like Ruby passed me this: $VAR1 = 1; It looks like Ruby passed me this: $VAR1 = [3]; It looks like Ruby passed me this: $VAR1 = '2'; It looks like Ruby passed me this: $VAR1 = {'4' => 5};

Other comments from his announcement:


I've tested it with Ruby 1.6.3 through 1.6.6, against Perl 5.6.0 and 5.6.1. I've only tried it on Linux so far. All helpers are welcome!

Some things which aren't working:
+ can't bind to functions (only classes & methods).
+ using iterators requires you to add "_iter" to the end of the method name (ugly, confusing)


Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to Inline::Ruby by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.