Re: Curious plperl behavior

From: Jeff <threshar(at)torgo(dot)978(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Jeff <threshar(at)threshar(dot)is-a-geek(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Curious plperl behavior
Date: 2010-02-25 17:03:47
Message-ID: 0FB4FAD7-E0BB-4578-997C-891D28F9C52D@torgo.978.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Feb 24, 2010, at 5:10 PM, Tom Lane wrote:

> Richard Huxton <dev(at)archonet(dot)com> writes:
>> On 24/02/10 21:34, Tom Lane wrote:
>>> Hmm. Jeff found some relevant material on perlref. Should that
>>> link be
>>> added? Should the link(s) be more specific than telling you to
>>> read the
>>> whole d*mn man page? Neither of those pages are short, and each
>>> contains
>>> a wealth of material that isn't related to this issue.
>
>> Hmm - perhaps a suggestion to google for "perl nested named
>> subroutine".
>> That seems to give a set of relevant results. Includes perldiag,
>> perlref, our mailing lists and Apache's mod_perl (which makes sense).
>
> Seems like a reasonable idea to me --- any objections? We should
> probably say "search" not "google" but otherwise seems like a fine
> solution.
>

Some sort of extended explanation would be helpful I think.
Admittedly, I didn't see the warning in the docs as I didn't look but
if I did see that I'd be very curious as to what exactly is
dangerous. The reality is you cannot safely refer to variables
outside the scope of the sub. Maybe just that sentence would suffice.
and a "for more details see the perlref documentation"

--
Jeff Trout <jeff(at)jefftrout(dot)com>
http://www.stuarthamm.net/
http://www.dellsmartexitin.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Allan Kamau 2010-02-25 17:41:22 Re: Tool for determining field usage of database tables
Previous Message Thomas Kellerer 2010-02-25 17:00:25 Re: Performance comparison