#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.12 2000/08/31 16:12:09 petere Exp $
+# $Header: /cvsroot/pgsql/src/pl/Makefile,v 1.13 2000/09/12 04:28:30 momjian Exp $
#
#-------------------------------------------------------------------------
DIRS += tcl
endif
-# Disabled because it doesn't work
-#ifeq ($(with_perl), yes)
-#DIRS += plperl
-#endif
+ifeq ($(with_perl), yes)
+DIRS += plperl
+endif
all install installdirs uninstall depend distprep:
@for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done
* ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.12 2000/07/05 23:11:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.13 2000/09/12 04:28:30 momjian Exp $
*
**********************************************************************/
count = perl_call_pv("mksafefunc", G_SCALAR | G_EVAL | G_KEEPERR);
SPAGAIN;
- if (SvTRUE(GvSV(errgv)))
+ if (SvTRUE(ERRSV))
{
POPs;
PUTBACK;
FREETMPS;
LEAVE;
- elog(ERROR, "creation of function failed : %s", SvPV(GvSV(errgv), na));
+ elog(ERROR, "creation of function failed : %s", SvPV_nolen(ERRSV));
}
if (count != 1) {
elog(ERROR, "plperl : didn't get a return item from function");
}
- if (SvTRUE(GvSV(errgv)))
+ if (SvTRUE(ERRSV))
{
POPs;
PUTBACK;
FREETMPS;
LEAVE;
- elog(ERROR, "plperl : error from function : %s", SvPV(GvSV(errgv), na));
+ elog(ERROR, "plperl : error from function : %s", SvPV_nolen(ERRSV));
}
retval = newSVsv(POPs);
else
{
retval = FunctionCall3(&prodesc->result_in_func,
- PointerGetDatum(SvPV(perlret, na)),
+ PointerGetDatum(SvPV_nolen(perlret)),
ObjectIdGetDatum(prodesc->result_in_elem),
Int32GetDatum(prodesc->result_in_len));
}
sv_catpvf(output, "'%s' => undef,", attname);
}
sv_catpv(output, "}");
- output = perl_eval_pv(SvPV(output, na), TRUE);
+ output = perl_eval_pv(SvPV_nolen(output), TRUE);
return output;
}