Leser: 1
|< 1 2 >| | 12 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <perl.h>
#ifndef DO_CLEAN
#define DO_CLEAN 0
#endif
#define BUFFER_SIZE 1024
static PerlInterpreter *my_perl = NULL;
main {
int argc;
char **argv;
char **env;
char *embedding[] = { "", "persistent.pl"};
char *args[] = { "", DO_CLEAN, NULL};
int exitstatus = 0;
STRLEN n_a;
my_perl = perl_alloc();
PERL_SYS_INIT3(&argc, &argv,&env);
if ((my_perl = perl_alloc()) == NULL) {
fprintf(stderr, "No Memory!");
exit(1);
}
perl_construct(my_perl);
exitstatus = perl_parse(my_perl, NULL,2, embedding, NULL);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
if (!exitstatus){
exitstatus = perl_run(my_perl);
args[0] = "tester1.pl";
call_argv("Embed::Persistent::eval_file", G_DISCARD | G_EVAL, args);
eval_pv("@time",TRUE);
eval_pv("$test",TRUE);
if (SvTRUE(ERRSV))
fprintf(stderr,"eval error: %s\n",SvPV(ERRSV, n_a));
}
PL_perl_destruct_level = 0;
perl_destruct(my_perl);
perl_free(my_perl);
PERL_SYS_TERM();
exit(exitstatus);
}
|< 1 2 >| | 12 Einträge, 2 Seiten |