I am writing a Tk program that allows users to save
various options, such as colors in the GUI and paths
for stored files. I would like these options to be
restored when the user runs the program again. So
I need a persistence mechanism for the options,
perhaps like an old-fashioned options .Xdefaults file.
I'm guessing that the .Xdefaults file format is now less
popular than it once was.
What is the preferred way to store these options?
So far I am considering Data::Denter, Data::Dumper, Storable,
XML, and .Xdefaults formats. I could use one of these
file formats to store a hash that holds all the option
information.
I would like to hear opinions on the best way to do this,
and what CPAN modules provide easy-to-implement support
for remembering user configuration information.
It should work perfectly the first time! - toma
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.