Perl 5.10 on MacBook 10.6.8 (Snow Leopard).
Is there a way to auto-save and restore global variables, such as those found in Data::Dumper?
I envisage something like:
use Data::Dumper; $Data::Dumper::blah = 0; # Set defaults $Data::Dumper::fred = 'xyz'; ... if ($i_am_debugging_this_bit) { SAVE(Data::Dumper); $Data::Dumper::blah = 1; # Override these for a bit $Data::Dumper::fred = 'nerd'; ... RESTORE(Data::Dumper); # Put them all back }
In reply to Can I auto-save and restore global variables? by davehorsfall
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |