pl/perl doc correction: subroutines

View: New views
2 Messages — Rating Filter:   Alert me  

pl/perl doc correction: subroutines

by Josh Berkus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

All,

From 40.1. PL/Perl Functions and Arguments

"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 the perldiag man page for
more details."

The reference to the "perldiag" doc is confusing because it's a
dictionary of errors.  We need to be specific about what part of the page:

"See "Variable %s Will Not Stay Shared" and "Variable %s is not
available" in the perldiag man page for more details."

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

--
Sent via pgsql-docs mailing list (pgsql-docs@...)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Re: pl/perl doc correction: subroutines

by Peter Eisentraut-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On fre, 2009-08-07 at 18:00 -0700, Josh Berkus wrote:
> The reference to the "perldiag" doc is confusing because it's a
> dictionary of errors.  We need to be specific about what part of the page:
>
> "See "Variable %s Will Not Stay Shared" and "Variable %s is not
> available" in the perldiag man page for more details."

Fixed.


--
Sent via pgsql-docs mailing list (pgsql-docs@...)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs