Hello, Thank you for your review. I have fixed most of your comments, except for the 5-th part, about data::dumper - I just couldn't understand your point, but I've added more tests with more complex objects if this helps.
Please, take a look at new patch. You can find it in attachments to this message (it is called "0001-jsonb_plperl-extension-v2.patch")
I changed few lines in regress tests.
Now, I am think so this patch is ready for commiters.