summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000000..a6853a70d7
--- /dev/null
+++ b/main.c
@@ -0,0 +1,27 @@
+#include "INTERN.h"
+#include "perl.h"
+
+main(argc, argv, env)
+int argc;
+char **argv;
+char **env;
+{
+ int exitstatus;
+ Interpreter *my_perl;
+
+ my_perl = perl_alloc();
+ if (!my_perl)
+ exit(1);
+ perl_construct( my_perl );
+
+ exitstatus = perl_parse( my_perl, argc, argv, env );
+ if (exitstatus)
+ exit( exitstatus );
+
+ exitstatus = perl_run( my_perl );
+
+ perl_destruct( my_perl );
+ perl_free( my_perl );
+
+ exit( exitstatus );
+}