This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.000d : [hint file updates]
[perl5.git] / miniperlmain.c
... / ...
CommitLineData
1/*
2 * "The Road goes ever on and on, down from the door where it began."
3 */
4
5#include "INTERN.h"
6#include "perl.h"
7
8static void xs_init _((void));
9static PerlInterpreter *my_perl;
10
11/* This value may be raised by extensions for testing purposes */
12int perl_destruct_level = 0; /* 0=none, 1=full, 2=full with checks */
13
14int
15main(argc, argv, env)
16int argc;
17char **argv;
18char **env;
19{
20 int exitstatus;
21
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 }
32
33 exitstatus = perl_parse( my_perl, xs_init, argc, argv, env );
34 if (exitstatus)
35 exit( exitstatus );
36
37 exitstatus = perl_run( my_perl );
38
39 perl_destruct( my_perl, perl_destruct_level );
40 perl_free( my_perl );
41
42 exit( exitstatus );
43}
44
45/* Register any extra external extensions */
46
47static void
48xs_init()
49{
50 /* Do not delete this line--writemain depends on it */
51}