Re: First feature patch for plperl - draft [PATCH]
От | Tim Bunce |
---|---|
Тема | Re: First feature patch for plperl - draft [PATCH] |
Дата | |
Msg-id | 20091204191635.GA89699@timac.local обсуждение исходный текст |
Ответ на | Re: First feature patch for plperl - draft [PATCH] (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Fri, Dec 04, 2009 at 11:01:42AM -0500, Tom Lane wrote: > Jeff <threshar@threshar.is-a-geek.com> writes: > > Is there any possible way to enable "use strict;" for plperl (trusted) > > modules? > > The plperl manual shows a way to do it using some weird syntax or > other. It'd sure be nice to be able to use the regular syntax though. Finding a solution is definitely on my list. I've spent a little time exploring this already but haven't found a simple solution yet. The neatest would have been overriding &CORE::GLOBAL::require but sadly the Safe/Opcode mechanism takes priority over that and forbids compiling code that does a use/require. I may end up re-enabling the require opcode but redirecting it to run some C code in plperl.c (the same 'opcode redirection' technique used by my NYTProf profiler). That C code would only need to throw an exception if the module hasn't been loaded already. Tim.
В списке pgsql-hackers по дате отправления: