From a2b34b16bed5699aa3ba407d9a412df65f448323 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 9 Jan 2010 02:40:50 +0000 Subject: Tidy up and refactor plperl.c. - Changed MULTIPLICITY check from runtime to compiletime. No loads the large Config module. - Changed plperl_init_interp() to return new interp and not alter the global interp_state - Moved plperl_safe_init() call into check_interp(). - Removed plperl_safe_init_done state variable as interp_state now covers that role. - Changed plperl_create_sub() to take a plperl_proc_desc argument. - Simplified return value handling in plperl_create_sub. - Changed perl.com link in the docs to perl.org and tweaked wording to clarify that require, not use, is what's blocked. - Moved perl code in large multi-line C string literal macros out to plc_*.pl files. - Added a test2macro.pl utility to convert the plc_*.pl files to macros in a perlchunks.h file which is #included - Simplifed plperl_safe_init() slightly - Optimized pg_verifymbstr calls to avoid unneeded strlen()s. Patch from Tim Bunce, with minor editing from me. --- doc/src/sgml/plperl.sgml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 9211693d3d9..2db97aa9015 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,4 +1,4 @@ - + PL/Perl - Perl Procedural Language @@ -14,7 +14,7 @@ PL/Perl is a loadable procedural language that enables you to write PostgreSQL functions in the - Perl programming language. + Perl programming language. @@ -313,7 +313,8 @@ SELECT * FROM perl_set(); use strict; in the function body. But this only works in PL/PerlU - functions, since use is not a trusted operation. In + functions, since the use triggers a require + which is not a trusted operation. In PL/Perl functions you can instead do: BEGIN { strict->import(); } -- cgit v1.2.3