I wrote:
>
> The attached tiny patch (not intended for application yet) provides a
> space for plperl functions to create and share session persistent
> data, which I should think would increase the utility of plperl.
> Essentially it creates a hash called %session_globals which it then
> injects into the safe container where plperl functions live.
>
...and the patch is attached here