From: Tom Lane Date: Thu, 25 Feb 2010 03:08:07 +0000 (+0000) Subject: Improve warning about creating nested named subroutines in plperl. X-Git-Tag: REL9_0_0~836 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=aed0829c63e6b167082235da0718c906ba248229;p=pg-rex%2Fsyncrep.git Improve warning about creating nested named subroutines in plperl. Per discussion. --- diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 549359f58f..bb25ab1380 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,4 +1,4 @@ - + PL/Perl - Perl Procedural Language @@ -85,12 +85,13 @@ $$ LANGUAGE plperl; The use of named nested subroutines is dangerous in Perl, especially if they refer to lexical variables in the enclosing scope. Because a PL/Perl - function is wrapped in a subroutine, any named subroutine you create will - be nested. In general, it is far safer to create anonymous subroutines - which you call via a coderef. See Variable "%s" will not stay shared - and Variable "%s" is not available in the - perldiag man page for more - details. + function is wrapped in a subroutine, any named subroutine you place inside + one will be nested. In general, it is far safer to create anonymous + subroutines which you call via a coderef. For more information, see the + entries for Variable "%s" will not stay shared and + Variable "%s" is not available in the + perldiag man page, or + search the Internet for perl nested named subroutine.