in reply to require without the exec

I'm not aware of anyway to do this through perl. Your best bet would be to use a data file. I did something similiar to this before and Data::Dumper came in handy.

In the install script you could do something like this:
use Data::Dumper; open(F, ">uninstall.dat") || die "Opening uninstall file failed: $!\n" +; print F Dumper \%hash; close(F);
Then in the uninstaller just read in the file and eval it and $VAR1(or whatever you name the variable) will contain a reference to the original hash.