Clean up package namespace use and use of Safe in plperl.

Andrew Dunstan <andrew@dunslane.net>

Commit: 56adf3703c77295b63a71a42e602df247132e409
Author: Andrew Dunstan <andrew@dunslane.net>
Date: 2010-02-16T21:39:52Z
Releases: 9.0.0
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.

Files