Commit | Line | Data |
---|---|---|
a0d0e21e LW |
1 | /* |
2 | * "The Road goes ever on and on, down from the door where it began." | |
3 | */ | |
4 | ||
2304df62 AD |
5 | #include "INTERN.h" |
6 | #include "perl.h" | |
7 | ||
a0d0e21e LW |
8 | static void xs_init _((void)); |
9 | static PerlInterpreter *my_perl; | |
10 | ||
11 | /* This value may be raised by extensions for testing purposes */ | |
12 | int perl_destruct_level = 0; /* 0=none, 1=full, 2=full with checks */ | |
13 | ||
14 | int | |
2304df62 AD |
15 | main(argc, argv, env) |
16 | int argc; | |
17 | char **argv; | |
18 | char **env; | |
19 | { | |
20 | int exitstatus; | |
2304df62 | 21 | |
a0d0e21e LW |
22 | #ifdef VMS |
23 | getredirection(&argc,&argv); | |
24 | #endif | |
25 | ||
26 | if (!do_undump) { | |
27 | my_perl = perl_alloc(); | |
28 | if (!my_perl) | |
29 | exit(1); | |
30 | perl_construct( my_perl ); | |
31 | } | |
2304df62 | 32 | |
a0d0e21e | 33 | exitstatus = perl_parse( my_perl, xs_init, argc, argv, env ); |
2304df62 AD |
34 | if (exitstatus) |
35 | exit( exitstatus ); | |
36 | ||
37 | exitstatus = perl_run( my_perl ); | |
38 | ||
a0d0e21e | 39 | perl_destruct( my_perl, perl_destruct_level ); |
2304df62 AD |
40 | perl_free( my_perl ); |
41 | ||
42 | exit( exitstatus ); | |
43 | } | |
44 | ||
45 | /* Register any extra external extensions */ | |
46 | ||
a0d0e21e LW |
47 | static void |
48 | xs_init() | |
2304df62 | 49 | { |
85e6fe83 | 50 | /* Do not delete this line--writemain depends on it */ |
2304df62 | 51 | } |