The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Changes for version 0.02 - 2012-01-27

  • Mostly spec changes (some major, backward-incompatible). Implementation still minimal/incomplete.
  • [INCOMPATIBLE] No more hash form! Now schema is either string or array. I've always hated writing the hash form and 99% always used the array form. Hash form can be re-added in the future in the unlikely event that we need it.
  • [INCOMPATIBLE] Array form now only allows one clause sets. To specify multiple clause sets, now there is a new clause named 'csets'. This is an application of Huffman encoding principle, as specifying multiple clause sets is relatively rare. The third element of array now can be used for other purposes, it is now an optional hash to store future extra stuffs.
  • [INCOMPATIBLE] Change merge prefixes, from the default provided by Data::ModeMerge (!, +, -, ^, et al) to the more verbose ([merge], [merge:+], [merge:!], and so on). This is also an application of Huffman encoding principle, since merging is relatively rare. The !, etc prefixes are going to be reused for other purposes. For example, !clause now means setting the .revert attribute.
  • [INCOMPATIBLE] Change syntax of attribute, from 'CLAUSE:ATTR' and ':ATTR' to 'CLAUSE.ATTR' and '.ATTR'. Using dot is nicer and now possible as the first character since we have changed merge prefixes.
  • Introduce shortcuts
  • [INCOMPATIBLE] String shortcuts are cut back. Now only 'foo*' is supported, to mean [foo => {req=>1}]. I find that this is the only shortcut that is commonly used, the rest not so much. Limiting the shortcuts feature allows simplifying the schema for Sah itself (no grammar needed, only a single regex needed to validate).
  • [INCOMPATIBLE] Sortable types: rename clause {min,max,between}ex -> x{min,max,between}
  • Type now can have namespaces too (e.g. MyCompany::order_id)
  • Add new clauses 'name', 'summary', 'description', 'tags'
  • (Re-)add manuals

Documentation

Description of Sah schema language
Translating Sah messages

Modules

Schema for data structures
Base class for Sah compilers (Data::Sah::Compiler::*)
Base class for type handlers
Base class for programming language compilers
Emit human text from Sah schema
Compile Sah schema to JavaScript code
Compile Sah schema to Perl code
Simple interface to Data::Sah
Specification for base type
Specification for comparable types
Specification for types that have the notion of elements
Specification for sortable types
Specification for 'float' type
Specification for type 'int'
Specification for num types
Sah utility routines