Open schwern opened 8 years ago
I am not sure we need to allow hash/array to work inside object, instead we can rely on the 'this' prop provided by meta:
object {
prop this => hash { ... }; # Check the hash of the object
};
This already works as written today.
#76 would discourage the use of Object { ... } in favor of
st Object => sub {
stc method => 'expect';
}
fields would essentially be discouraged everywhere, so the problem this ticket mentions would be solved.
It's glassbox testing to say that an object must contain certain hash fields and should not be encouraged. Unfortunately the
object
doc example spends half its time on this.This is particularly egregious with
end
. This requires that the object contain exactly certain specific fields and no others. Andend
only applies to certain parts of the object description complicating how the user expectsend
to work.To that end...
field
andend
from theobject
docs.hash
,array
, andbag
to work insideobject
.This eliminates a bunch of redundancy in
object
withhash
andarray
, and it allows theobject
docs to focus on blackbox testing.