Revision history for Data-Sah
0.04 2012-07-20 (SHARYANTO)
No functional changes. Rebuild because dzil still included files in
lib-disabled/.
0.03 2012-07-20 (SHARYANTO)
Mostly spec changes (syntax changes, lots of removed clauses to be more
orthogonal). Implementation is still grossly incomplete.
- (spec) New clause 'cset' to contain a clause set inside a clause.
This provides a more elegant way to nest clauses, with possibly
complex relationships (combine with {max,min}_{ok,nok} attributes).
- [INCOMPATIBLE] (spec) Remove {max,min}_{ok,nok} *clauses*. They are
now purely attributes. To apply to a set of clauses, apply to the
new 'cset' clause.
- [INCOMPATIBLE] (spec) Rename 'value' and 'values' attribute to
'val'/'vals'. (Huffman principle)
- [INCOMPATIBLE] (spec) Remove 'CLAUSENAME.*' syntax, it's ugly.
- [INCOMPATIBLE] (spec) Change 'if' clause syntax: [if, expr, EXPR,
cset, CSET]. Might probably change again :-)
- [INCOMPATIBLE] (spec) Change merge prefix syntax from [merge:OP] to
[mergeOP], e.g. [merge+]. (Huffman principle)
- [INCOMPATIBLE] (spec) Remove unnecessary 'str' clauses: match_all,
match_any, not_match, match_none (they can be replaced with the more
generic clause sttributes 'values' and {min,max}_{ok,nok})
- [INCOMPATIBLE] (spec) Remove unnecessary 'int' clauses: indiv_by (can
be replaced with the more generic clause attributes 'values' and
{min,max}_{ok,nok})
- [INCOMPATIBLE] (spec) Remove unnecessary 'HasElems' clauses: has_all,
has_any, has_none (can be replaced with the more generic clause
attributes 'values' and {min,max}_{ok,nok})
- [INCOMPATIBLE] (spec) Remove unnecessary 'Comparable' clauses: isnt,
not_in (can be replaced with the more generic clause attributes
'values' and {min,max}_{ok,nok})
- [INCOMPATIBLE] (spec) Remove .revert attribute, use .max_ok instead
- '.attr' clause is now allowed again.
- (spec) New attribute: default_lang (like in Rinci)
- Remove warning under Perl 5.16 [RT#78491]
0.02 2012-01-27 (SHARYANTO)
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 .max_ok attribute to 0.
+ [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
0.01 2011-11-23 (SHARYANTO)
First release, very preliminary, almost nothing is implemented. Changes
from old Data::Schema:
+ [INCOMPATIBLE] Terminology changes: 'attribute' becomes 'clause', to
make it less ambiguous.