in reply to Storable for user preferences
Storable is very good but might be more than is needed for this use case.
If the preferences are all numeric and text values then it might be simpler to use a text based config format. That way users can see and edit their config values using a text editor. There is always the risk they will make a mess of the formatting but you could always add big warnings to the top of the file so it is caveat emptor if they do. (Edit: And fall back to system defaults with a warning when that happens.)
See for example Config::Any for a list of options, e.g. YAML, JSON or INI. Best to avoid the Perl format since it is loaded using do {} so will run any code in the file and is thus a potential security issue.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Storable for user preferences
by Fletch (Bishop) on Sep 30, 2023 at 22:12 UTC | |
Re^2: Storable for user preferences
by Bod (Parson) on Sep 30, 2023 at 22:07 UTC | |
by afoken (Chancellor) on Oct 04, 2023 at 12:30 UTC | |
by Bod (Parson) on Oct 12, 2023 at 23:17 UTC | |
by stevieb (Canon) on Oct 13, 2023 at 06:28 UTC | |
by swl (Prior) on Oct 03, 2023 at 22:46 UTC |