Undefined subroutine &readline::rl_basic_commands called at...
####
if (exists &readline::rl_basic_commands){&readline::rl_basic_commands(keys %cmds);}
####
#!perl
use strict;
use warnings;
use Term::ReadLine;
$ENV{TERM}=undef;
my $term = Term::ReadLine->new('xxx');
my %cmds = (a=>1,b=>2);
# THIS WORKS &readline::rl_basic_commands(keys %cmds);
# THE FOLLOWING CHECK DOES NOT WORK
if (exists &readline::rl_basic_commands){print "BEFORE WHILE EXISTS\n"; &readline::rl_basic_commands(keys %cmds);}
while ( defined ( $_ = $term->readline( '>') ) ) {
print "$_\n";
}
continue{
# THIS CHECK WORKS INDEED!
if (exists &readline::rl_basic_commands){print "IN CONTINUE EXISTS\n"; &readline::rl_basic_commands(keys %cmds);}
}