Permalink
Browse files

Decrease prio of max/re clauses from 50->51 so the human result can b…

…e a nicer "at least X, at most Y" instead of "at most Y, at least X"
  • Loading branch information...
1 parent fdb759c commit 3cc8040aefea8893a6acf7fc1546f489f062b809 Steven Haryanto (on PC) committed Jan 18, 2013
Showing with 5 additions and 0 deletions.
  1. +1 −0 lib/Data/Sah/Type/HasElems.pm
  2. +2 −0 lib/Data/Sah/Type/Sortable.pm
  3. +2 −0 lib/Data/Sah/Type/hash.pm
@@ -8,6 +8,7 @@ use Data::Sah::Util::Role 'has_clause';
requires 'superclause_has_elems';
has_clause 'max_len',
+ prio => 51,
arg => ['int*' => {min=>0}],
allow_expr => 1,
code => sub {
@@ -26,6 +26,7 @@ has_clause 'xmin',
},
;
has_clause 'max',
+ prio => 51,
tags => ['constraint'],
arg => 'any*',
allow_expr => 1,
@@ -35,6 +36,7 @@ has_clause 'max',
},
;
has_clause 'xmax',
+ prio => 51,
tags => ['constraint'],
arg => 'any*',
allow_expr => 1,
@@ -26,6 +26,7 @@ has_clause "keys",
},
;
has_clause "re_keys",
+ prio => 51,
tags => ['constraint'],
arg => ['hash*' => {keys => 're*', values => 'schema*'}],
allow_expr => 0,
@@ -47,6 +48,7 @@ has_clause "allowed_keys",
allow_expr => 1,
;
has_clause "allowed_keys_re",
+ prio => 51,
tags => ['constraint'],
arg => 're*',
allow_expr => 1,

0 comments on commit 3cc8040

Please sign in to comment.