Use strict with plperl

Started by mike gabout 21 years ago2 messagesgeneral
Jump to latest
#1mike g
mike@thegodshalls.com

In 8.0 how does one have a plperl function use strict?

If I add "use strict" within the function body I receive an error message: "creation of Perl function failed: 'require' trapped by operation mask..."

If I do Create Function X AS .... Language 'plperl' strict volatile the function will compile and execute. However if I do not explicitly declare any variables as my / local / global it still executes which under the strict rule should not.

Mike

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: mike g (#1)
Re: Use strict with plperl

"Mike G." <mike@thegodshalls.com> writes:

In 8.0 how does one have a plperl function use strict?
If I add "use strict" within the function body I receive an error message: "creation of Perl function failed: 'require' trapped by operation mask..."

You'd have to use plperlu to be allowed to "use" anything. It's
annoying that this blocks out perfectly safe modules like "strict",
but as far as I understand the security model we can't be more
selective.

If I do Create Function X AS .... Language 'plperl' strict volatile
the function will compile and execute.

Utterly unrelated ...

regards, tom lane