Would calling the save_config from a destructor on the object work for you? Something like the following added to package FooBar:
#untested sub DESTROY { my $self = shift; $self->save_config; }
-rattus
__________
He seemed like such a nice guy to his neighbors /
Kept to himself and never bothered them with favors
- Jefferson Airplane, "Assassin"
In reply to Re: Running a sub before a script exits?
by rattusillegitimus
in thread Running a sub before a script exits?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |