in reply to Persistent data structures -- why so complicated?
probably I missed the point but if you are programming in perl I do not see the complexity using Storable. Anyway first of all take a look to a recent thread: Banal Configuration Languages
That said you can have a lot of options beside Storable. The basic Data::Dumper dumps structures that can be eval -ed to have the datastructure back.
If you like more human readable solutions there is YAML or the very common outside perl world JSON
I used something like perl -MYAML -MStorable -e "print Dump @{retrieve ($ARGV[0])};" and perl -e "use YAML (LoadFile); use Storable qw(nstore); @ar = LoadFile($ARGV[0]); nstore(\@ar, $ARGV[1])" to translate YAML and Storable formats.
A plethora of Config::* modules are also available.
You can have comma separated data, in external files but also after the __DATA__ token.. So.. many many options for every taste.
HTH
L*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2:Persistent data structures -- why so complicated?
by davebaker (Pilgrim) on Mar 11, 2021 at 22:33 UTC | |
by Tux (Canon) on Mar 12, 2021 at 08:34 UTC |