Since PERL_SYS_INIT3() may change C<env>, it may be more appropriate to
provide C<env> as an argument to perl_parse().
+Also notice that no matter what arguments you pass to perl_parse(),
+PERL_SYS_INIT3() must be invoked on the C main() argc, argv and env and
+only once.
+
Now compile this program (I'll call it I<interp.c>) into an executable:
% cc -o interp interp.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
SvREFCNT_dec(command);
*match_list = get_av("array", 0);
- num_matches = av_len(*match_list) + 1; /** assume $[ is 0 **/
+ num_matches = av_len(*match_list) + 1;
return num_matches;
}
#include <perl.h>
/* we're going to embed two interpreters */
- /* we're going to embed two interpreters */
#define SAY_HELLO "-e", "print qq(Hi, I'm $^X\n)"
=head1 Hiding Perl_
-If you completely hide the short forms forms of the Perl public API,
+If you completely hide the short forms of the Perl public API,
add -DPERL_NO_SHORT_NAMES to the compilation flags. This means that
for example instead of writing