- /*
- ENTER;
- SAVETMPS;
- */
- context->perli_ready = 1;
-
- /* parse, and run the init call */
- if (context->origi == NULL) {
- logf (LOG_LOG, "Interpreting filter class:%s", filterClass);
-
- arglist[2] = (char *) data1_get_tabpath(p->dh);
- sprintf(modarg,"-M%s",filterClass);
- arglist[3] = (char *) &modarg;
- sprintf(initarg,"%s->init;",filterClass);
- arglist[5] = (char *) &initarg;
-
- perl_parse(context->perli, PERL_XS_INIT, 6, arglist, NULL);
- perl_run(context->perli);
- }
-
- strcpy(context->filterClass, filterClass);
-
- /* create the filter object as a filterClass blessed reference */
- Filter_create(context);
- }
-
- /* Wow... if calling with individual update_record calls from perl,
- the filter object reference may go out of scope... */
- if (!sv_isa(context->filterRef, context->filterClass)) {
- Filter_create(context);
- logf (LOG_DEBUG,"Filter recreated");
- }
-
- if (!SvTRUE(context->filterRef)) {
- logf (LOG_WARN,"Failed to initialize perl filter %s",context->filterClass);
- return (0);
- }
-
- /* call the process method */
- Filter_process(context);
-
- /* return the created data1 node */
- return (context->res);