in reply to Storable
A trick that I've found useful in TK apps is the following:
use vars qw/$CONFIG $DATA/; BEGIN { $CONFIG = "$0.conf"; $DATA = retrieve($CONFIG) if -e $CONFIG; } END { store($DATA, $CONFIG); }$DATA is a reference to a hash that contains the user entered data. This little addition to the program means the data entered by the user in the last session becomes the default in this session... saves a heck of a lot of typing - particularly during testing!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Storable
by TheoPetersen (Priest) on Feb 23, 2001 at 19:10 UTC | |
by tye (Sage) on Feb 23, 2001 at 20:44 UTC | |
by crazyinsomniac (Prior) on Jan 17, 2002 at 12:04 UTC |
In Section
Module Reviews