- char *embedding[] = { "", "-e", "0" };
-
- Debug( LDAP_DEBUG_TRACE, "perl backend open\n", 0, 0, 0 );
-
- if( perl_interpreter != NULL ) {
- Debug( LDAP_DEBUG_ANY, "perl backend open: already opened\n",
- 0, 0, 0 );
- return 1;
- }
-
- perl_interpreter = perl_alloc();
- perl_construct(perl_interpreter);
- perl_parse(perl_interpreter, perl_back_xs_init, 3, embedding, (char **)NULL);
- perl_run(perl_interpreter);
-
- bi->bi_open = perl_back_open;
+ char *embedding[] = { "", "-e", "0", NULL }, **argv = embedding;
+ int argc = 3;
+#ifdef PERL_SYS_INIT3
+ char **env = environ;
+#else
+ char **env = NULL;
+#endif
+
+ bi->bi_open = NULL;