Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Want to redirect the Perl stdout and stderr

1 view
Skip to first unread message

JR Heisey

unread,
Apr 6, 2015, 1:45:02 PM4/6/15
to per...@perl.org
Greetings,

I have a command line Perl application.
I am embedding that Perl application into a GUI application.

I have stdout redirect using

tie *SIMOUT, "MyStdOutPackage";

Sometimes I have an issue when starting up the .pl file since I am
modifying it for this usage.

I want to redirect Perl's stdio before I call perl_parse() using the
PerlApi.

I found PerlIO_define_layer() which takes PerlIO_funcs pointer.
So this is the only thing I found that comes close.
However I don't see the PerlIO_funcs structure defined anywhere so I
cannot provide my own implementation.

I am stumped. Is this even possible?

Thanks,
J.R. Heisey
0 new messages