[BioRuby] Using CPAN

pjotr at pckassa.com pjotr at pckassa.com
Thu Jan 8 03:06:34 EST 2004


Great! We are back on-line.

I have a generic idea to write a module which would allow using CPAN
from Ruby:

The idea is to fire up a Perl XML/RPC or SOAP server from Ruby and use a
simple interface for calling Perl.

E.g.

~

perl = Perl.new   # Invoke Perl server listening on XML/RPC port

x = XMLRPC.new(perl.port) # or whatever
x.eval "use Mail::Box; $m = new Mail::Box();"
list = x.eval "$m->list();"
list.each do | header |
  x.eval "print",header
end

~~

The advantages:

- One Perl instance per Ruby instance
- Dynamic resolution
- No name space problems

therefore pretty generic. No linking of instances whatsoever. A
ext::DL interface could be used too - if Perl sits in a library.

Disadvantage:

Slow, security can be a problem (network layer) and need to resolve
multiple instances running at the same time (multiple servers).

Also passing/returning non-standard types language types may be hard
to achieve (meanwhile array, hash, etc should be straightforward).

I have been thinking about this for years (off and on) and this
looks like it may be feasible.

The reason I am writing this to the list is if to see if there are
other parties interested. Ruby RAA is quite good, but I am envious
about some of the BioPerl facilities and modules like Mail::Box. I
could help people choosing Ruby since it has BioPerl support(!). What
do you think?

Pj.


More information about the BioRuby mailing list