OSDN Git Service

Clean up package namespace use and use of Safe in plperl.
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 16 Feb 2010 21:39:52 +0000 (21:39 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 16 Feb 2010 21:39:52 +0000 (21:39 +0000)
commit56adf3703c77295b63a71a42e602df247132e409
tree515457e5c1ef01b1a4e4d3dbeb60d16a9019e955
parent813135d8c98e2f2d6d646150005148d79f4f4e25
Clean up package namespace use and use of Safe in plperl.
Prevent use of another buggy version of Safe.pm.
Only register the exit handler if we have  successfully created an interpreter.
Change log level of perl warnings from NOTICE to WARNING.

The infrastructure is there if in future we decide to allow
DBAs to specify extra modules that will be allowed in trusted code.
However, for now the relevant variables are declared as lexicals
rather than as package variables, so that they are not (or should not be)
accessible.

Mostly code from Tim Bunce, reviewed by Alex Hunsaker, with some
tweaks by me.
src/pl/plperl/expected/plperl.out
src/pl/plperl/expected/plperl_elog.out
src/pl/plperl/expected/plperlu.out
src/pl/plperl/plc_perlboot.pl
src/pl/plperl/plc_safe_ok.pl
src/pl/plperl/plperl.c
src/pl/plperl/sql/plperl.sql