I am having a hard time understanding the Term::ReadLine::Gnu documentation and there is very little else to be found on-line. Perhaps this error may light a bulb:
function is not of type rl_command_func_tPtr at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Term/ReadLine/Gnu/XS.pm line 98.
This was produced with:
#!/usr/bin/perl -w
use strict;
use Term::ReadLine;
# presuming Term::ReadLine::Gnu is present...
my $term = new Term::ReadLine 'ReadLine test';
my $prompt = "type: ";
$term->bind_key('61', \&insertxt);
while (1) {
my $input=$term->readline($prompt);
}
sub insertxt {
$term->insert_text("hello!");
}
the "key" argument to bind_key (61) must be numeric.
anyway, there is a whole slew of functions listed in the documentation that obviously presume a knowledge i don't have, because there are no usage examples or explanations, and i have grown tired guessing. I thot anything beginning with "int" is for C...