W
William
Hello,
I am trying to embed Perl in a C++ application. I have a window that
takes input, when user hits return, the input is sent to Perl for
evaluation. I then want to display the input back to the user in the
window and display it differently for error versus normal output.
I've searched the web, but can't seem to find a clear example of how to
do this in C.
Presently, after calling result = perl_eval_pv() to eval the user
input, I do SvPV(result, PL_sa) and the result goes to my window. The
result is a code indicating success etc.
However, this leaves stdout and stderr still going to the shell where
my app was launched.
I would like a pointer to an example of this kind of thing being done
so I can emmulate it.
I've found many places where this question is asked but no clear
answer.
Thanks.
-William
I am trying to embed Perl in a C++ application. I have a window that
takes input, when user hits return, the input is sent to Perl for
evaluation. I then want to display the input back to the user in the
window and display it differently for error versus normal output.
I've searched the web, but can't seem to find a clear example of how to
do this in C.
Presently, after calling result = perl_eval_pv() to eval the user
input, I do SvPV(result, PL_sa) and the result goes to my window. The
result is a code indicating success etc.
However, this leaves stdout and stderr still going to the shell where
my app was launched.
I would like a pointer to an example of this kind of thing being done
so I can emmulate it.
I've found many places where this question is asked but no clear
answer.
Thanks.
-William