App-Spec-p5
App-Spec-p5 copied to clipboard
proposed changes to use more of Moo, second attempt
(This PR contains the same changes as #15, but organised in a way that should make it much easier to review)
In reference to #14 :
- type constraints everywhere: among other things, this makes clearer what each attribute can accept
- defaults for all attributes where it makes sense
-
BUILDARGS
/new
instead ofcommon
/build
, this makes classes easier to use and extend -
op
now canonically accepts a coderef (previously it did, but probably by mistake: it's a useful feature, let's support it properly)
Maybe needed before merging:
- documentation for all the type constraints
- better names for them
Possible future work:
- review the various enums
- review the various union types, and check if they really make sense
- reduce the number of
rw
attributes
I suggest looking at one commit at a time, in order: I've tried to keep them self-contained (tests always pass, for example) and focused (one file, or one class of type constraints per commit, for example).