is just a base module responsible for loading extension (Data::Keys::E::*) during the object build time. It just makes sure one of the extensions supplied get() and set() method. The rest is up to the extensions.
get() should be called with one argument a $key and return value for it. set() should be called with $key and $value arguments returning modified (if it was) $key.
So far I've created this extensions:
- Store::Dir - folder storage
- Store::Mem - in memory storage
- Dir::Auto - auto create folder when needed
- Key::Adapt - change key with a callback
- Key::Auto - auto create key via callback
- UniqSet - a key can be set only once
- Value::InfDef - inflate/deflate values
- Locking - get/set locking
- Dir::Lock - uses additional folder to lock files
- Dir::LockInPlace - place locks directly on the stored files
How I want to use it now? Value::InfDef to help reading folders full of JSON files. Key::Auto to store data as Git does - based on the hash of data. Key::Adapt to easily access Debian distribution files in the pool folder or CPAN distributions files based on the AUTHORID/DISTRIBUTION in CPAN mirror folder structure.
For now there is just folder storage as I want to use it for some tasks, but it should be quite easy to create any key/value storage extension.
Leave a comment