root/lang/c/misc/oreoreperl/oreoreperl.c

Revision 6308, 0.6 kB (checked in by drry, 10 months ago)

lang/c/misc/oreoreperl/oreoreperl.c: fixed typo.

Line 
1/*
2   author: yappo
3   license: perl
4   see also: perldoc perlembed
5*/
6
7#include <EXTERN.h>
8#include <perl.h>
9
10static PerlInterpreter *my_perl;  /***    The Perl interpreter    ***/
11
12int main(int argc, char **argv, char **env) {
13  char *perl_argv[] = { NULL, "/dev/null" };
14  int perl_argc = 2;
15  perl_argv[0] = argv[0];
16
17  PERL_SYS_INIT3(&perl_argc, &perl_argv, &env);
18
19  my_perl = perl_alloc();
20  perl_construct(my_perl);
21
22  perl_parse(my_perl, NULL, perl_argc, perl_argv, (char **)NULL);
23  PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
24
25  perl_run(my_perl);
26  eval_pv("use OreOrePerl;", TRUE);
27
28  perl_destruct(my_perl);
29  perl_free(my_perl);
30  PERL_SYS_TERM();
31}
Note: See TracBrowser for help on using the browser.