This is a work in progress, a tutorial introduction to workflow and related techniques based on my CPAN package Workflow::wftk.
It has the unique feature that each section of code illustrated here in the tutorial is duplicated in the unit tests for the modules themselves, so that everything here is guaranteed to work as advertised. (Note: this does not constitute a legal guarantee. It's open-source code; you're on your own as far as legal responsibility is concerned.)
At some point, there will be more in-depth projects presented as well. I'm not sure what form that will take, so I'm just dangling it in front of you for the time being. Drop me a line if you have suggestions.
As this is, in fact, a work in progress, many of the titles you see here do not yet correspond to working code. Those titles all start with an unmatched parenthesis. So any section with such a marked title is subject to change. Just so you're warned.
As of March 2009, work is still proceeding in Chapter 02 Data. Without a good grounding in the basics of data representation and the system landscape, none of the rest of it makes any sense. I honestly am starting to get the feeling that the data modules will constitute well over half the working code of the complete project.
01 "Brief" introduction to the workflow toolkit
This is the place to start if you're new to the topic. The wftk contains a great deal of functionality and it's easy to get lost; the introduction will help you get unlost by presenting the functionality in a logical order.
02 Data organization and document management
- 02-a Basic data list manipulation: memory-based lists
- 02-b File lists: storing data in flat files
- 02-c Directory lists: storing data in files in a subdirectory
- Storing record-based data in a directory
- Reading directory metadata using SQL
- (Restricting the files made visible to a list
- (Composite keys
- (Treating file contents as attachments
- (Using alternative record parser/dumpers in a directory (e.g. XML)
- (Keeping attachments and data files in the same directory
- (Keeping attachments in a directory but data in a flat file
- (Using a directory attachment storage for record supplementation
- 02-d (Storing data in MySQL
- 02-e (Generic DBI: storing data anywhere other people have worked out for us
- 02-f (Writing custom list classes
- 02-g (Indexing and other complex SQL use
- 02-h Working with records
- The basic record: flat values
- (Setting default values
- (Creating records in other speedy ways
- Record storage in files
- Tying hashes
- Inline text bodies
- List values
- Boolean values
- (Comments and blank lines as metadata
- (Text bodies not named 'body'
- Subrecords and dotted nomenclature
- Extracting data from records
- (Dumping and parsing records
- (Dumping and parsing records as XML
- (Dumping and parsing records using arbitrary parsers/formatters (e.g. MIME email)
- (Templates I: publishing records for human consumption
- (Record storage I: saving pieces of records in different places
- (Record storage II: attachments, both inline and not
- (Record storage III: specifying shallow and deep retrieval
- 02-i (Historical data and enactments
- 02-j Document management
- (Attaching documents to records
- (Treating a normal data field as an attachment
- (Dead-simple document management: filesystem plus metadata
- (Multiple attachments and references: the folder model
- (Version control
- (Checkin and checkout
- (Retention management
- (Recipe: mailing documents into an archive
- (Recipe: tracking a CVS system
- 02-k (Data within data: references and sublists
- 02-l (Publishing human-readable data