Re: First feature patch for plperl - draft [PATCH] - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: First feature patch for plperl - draft [PATCH]
Date
Msg-id 4B1958A9.2050402@dunslane.net
Whole thread Raw
In response to Re: First feature patch for plperl - draft [PATCH]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: First feature patch for plperl - draft [PATCH]
List pgsql-hackers

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.
>
>             
>   

As is documented, all you have to do is have:
   custom_variable_classes = 'plperl'   plperl.use_strict = 'true'

in your config. You only need to put the documented BEGIN block in your 
function body if you want to do use strict mode on a case by case basis.

We can't allow an unrestricted "use strict;" in plperl functions because 
it invokes an operation (require) that Safe.pm rightly regards as unsafe.

cheers

andrew


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: First feature patch for plperl - draft [PATCH]
Next
From: Tom Lane
Date:
Subject: Re: First feature patch for plperl - draft [PATCH]