views:

69

answers:

1

I'm just curious if when writing PL/Perl functions if I can have a use My::Lib; statement, or enable pragma's and features (e.g. 'use strict; use feature 'switch';).

+5  A: 

Not when using PL/Perl. It restricts the use of require and use, so you cannot import modules. However, you can install PL/Perlu (for unrestricted mode) which allows you to load modules.

plperlu can be considered a security risk, however, as it also allows filesystem commands such as open.

CanSpice
plperlu can be very usefull just think about security when making use of it and if it impacts your system in a way that you may want to stay away from it. The important thing to mitigate security risk with plperlu is to have any procedures written in it reviewed very carefully to make sure it's not doing bad things.
StarShip3000