Various pieces of Bot::Cobalt need to read and write serialized perl data from/to disk. This simple OO frontend makes it trivially easy to work with a selection of serialization formats, automatically enabling Unicode encode/decode and optionally providing the ability to read/write files directly.

Errors will typically throw fatal exceptions (usually with a stack trace) via "confess" in Carp -- you may want to look into Try::Tiny for handling them cleanly.

Specify an input and output serialization format; this determines the serialization method used by "writefile", "readfile", "thaw", and "freeze" methods. (You can change formats on the fly by calling Format as a method.)