It's hard. I've tried. The best option I've found that doesn't involve mucking about in
perlguts, interpreting PP code, and trying to recreate stashes and the like, is to keep around the text of an
eval()d sub, or make a string that contains code to recreate the reference.
There are rumblings that The Damian is working on something to allow Data::Dumper to dump code references, and the same sort of technology will be much easier to attach to Storable. For now... good luck.