[Gambas-user] Calling Perl module

Rob sourceforge-raindog2 at ...94...
Wed Mar 26 14:21:00 CET 2008


On Wednesday 26 March 2008 08:19, MaxVK wrote:
> Is there any way to call the Gtk2::Spell Perl module from within
> Gambas? Iv seen this used as a plugin but can it be 'plugged in' to
> a Gambas application?

The way I've used Perl modules from within Gambas in the past (most 
often with Expect to emulate a TTY) has been to write a Perl script 
using it, and run that script with EXEC, sending it input and 
receiving output from it.

It'd probably be possible to write a gb.perl component to use Perl 
modules directly, but I don't really know where to begin with that.  
If we were going the other way we'd probably use the XS Perl module, 
but I think to access Perl modules you'd basically have to include a 
Perl interpreter as a component.  This is probably doable (I think 
exim, the mail server does this to allow perl regular expressions in 
its config files or something) but I think at that point you might as 
well just shell out to a Perl script.

For this particular case, I think an aspell (or hunspell or enchant) 
Gambas component would be more appropriate, but I don't know what you 
plan to do with your spellchecker.

Rob




More information about the User mailing list