in reply to Re^4: Restoring CGI.pm object
in thread Restoring CGI.pm object

You can localize changes to the hash...
sub my_restornator { local %ENV; %ENV = restore_env(); # do things with the restored CGI object # goes back the way it was after this brace: }

If you're really clever, you could possibly make a restoredCGI object, I'm a little unsure on the details. Can it be done with Autoloader + local? Dunno for sure.

-Paul