Having successfuly installed Curses and Curses::GUI, I wrote the following test code;
#!/usr/bin/perl
# test.pl --
use Modern::Perl '2020';
use utf8;
no if $] >= 5.018, warnings => "experimental";
use open ':std', ':encoding(UTF-8)';
use autodie;
use Curses;
initscr;
endwin;
That produces the following error message;
C:\Users\hsmyers\perl\two>test
Curses function 'initscr' is not defined in your Curses library at C:\
+Users\hsmyers\perl\two\test.pl line 10.
if you comment out
initscr; you get an nearly identical message;
C:\Users\hsmyers\perl\two>test
Curses function 'endwin' is not defined in your Curses library at C:\U
+sers\hsmyers\perl\two\test.pl line 11.
Just as a check I compiled the following with;
gcc curhello.c -lcurses
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <curses.h>
int main(void) {
WINDOW * mainwin;
if ( (mainwin = initscr()) == NULL ) {
fprintf(stderr, "Error initialising ncurses.\n");
exit(EXIT_FAILURE);
}
mvaddstr(13, 33, "Hello, world!");
refresh();
sleep(3);
delwin(mainwin);
endwin();
refresh();
return EXIT_SUCCESS;
}
As I thought, it ran without a problem. This, in my mind, suggests that the successful installation of curses.pm, wasn't. All of this is in Windows 10, the most problematic perl playground. Since I've already done a great deal of coding using WSL/Ubuntu, I know that the same module has no problem in 'nix, just Windows. Does anyone have any suggestions?
--hsm
"Never try to teach a pig to sing...it wastes your time and it annoys the pig."