Neil, There is an Inline::Octave on CPAN, don't think I've heard anything about an Inline::R though (here's your chance... :)).
I'm pretty sure what you want to do is supported by Inline, provided that you can get your hands on both Inline modules. I must admit I've never tried it, but I think I'll give it a try tomorrow. It's probably best to put each language in it's own package to be sure everything is clean: -----8<----- package My::Perl # Perl init code, get your Perl data package My::Octave use Inline Octave ... # Pass Perl data to Octave package My::R use Inline R ... # Pass Perl data to R package My::Perl # Wrap up -----8<----- That way you will be sure that each ILSM puts it's stuff in a different namespace and you don't get any clashes. Good luck, Patrick >From: "Neil Osborne" <[EMAIL PROTECTED]> >To: "Inline Perl" <[EMAIL PROTECTED]> >Subject: Newblie question on Inline >Date: Sun, 3 Feb 2002 14:54:21 -0000 > >Hi All, > >I just came accross Inline a couple of months ago. It's simply amazing. I >don't think I'll every get my head around how it works but it really is >magic. I have a couple of (C) libraries that I have been meaning to expose >to Perl for a while now. But so far, any time I dipped into the Perl guts >documentation, I quickly convinced my self that there are more important >things I can do with my time ! > >Anyway, Inline is the solution I have been waiting for all this time (many >thanks again to all you guys). > >OK, here's what I want to do. I'll explain in a couple of steps. > >1. Make my library (functions) available to perl, using Inline so I can >call my functions from Perl (effectively build a Perl module using Inline) > >2. I also want to be able to be able to pass data from perl (obtained by >calling functions in my library) to R and Octave (incidentally, is there an >Inline module for R or Octave ) ? > >3. I want to be able to write a perl script which would like something like >this > >#!perl >package MyModule ; #fcreated using inline >use strict; > >#load data into perl variables using my module >............... > >#R code section - pass data in perl variables to R >#R language section follows > >#Octave code section - pass data in Rl variables to Octave (possibly via >Perl first ?) >#Octave language section follows > >#Return data to Perl > > >Is this possible using Inline ? > > >I look forward to hearing from you guys soon. > > >Many thanks in advance > > >Neil > > > ---------------------------------- | Patrick LeBoutillier | [EMAIL PROTECTED] _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com
