This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Okay, here's your official unofficial closure leak patch
[perl5.git] / miniperlmain.c
1 /*
2  * "The Road goes ever on and on, down from the door where it began."
3  */
4
5 #include "EXTERN.h"
6 #include "perl.h"
7
8 static void xs_init _((void));
9 static PerlInterpreter *my_perl;
10
11 int
12 main(argc, argv, env)
13 int argc;
14 char **argv;
15 char **env;
16 {
17     int exitstatus;
18
19 #ifdef VMS
20     getredirection(&argc,&argv);
21 #endif
22
23     if (!do_undump) {
24         my_perl = perl_alloc();
25         if (!my_perl)
26             exit(1);
27         perl_construct( my_perl );
28     }
29
30     exitstatus = perl_parse( my_perl, xs_init, argc, argv, env );
31     if (exitstatus)
32         exit( exitstatus );
33
34     exitstatus = perl_run( my_perl );
35
36     perl_destruct( my_perl );
37     perl_free( my_perl );
38
39     exit( exitstatus );
40 }
41
42 /* Register any extra external extensions */
43
44 static void
45 xs_init()
46 {
47     /* Do not delete this line--writemain depends on it */
48 }