Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc .^ver and .^auth for class, role, grammar, module and package
  • Loading branch information
gfldex committed Jul 8, 2016
1 parent 44a60a7 commit 845d9dd
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions doc/Language/typesystem.pod6
Expand Up @@ -141,10 +141,30 @@ TODO
TODO
=head3 Versioning and Authership
Versioning and authership can be applied via adverbs C«:ver<>» and C«:auth<>.
Both take a string as argument, for C<:ver> the string is converted to a
L<Version|/type/Version> object. To query a class version and auther use
C<.^ver> and C<^.auth>.
class C:ver<4.2.3>:auth<me@here.local> {}
say [C.^ver, C.^auth];
# OUTPUT«[v4.2.3 me@here.local]␤»
=head2 C<role>
TODO
Versioning and authership can be applied via adverbs C«:ver<>» and C«:auth<>.
Both take a string as argument, for C<:ver> the string is converted to a
L<Version|/type/Version> object. To query a roles version and auther use
C<.^ver> and C<^.auth>.
class R:ver<4.2.3>:auth<me@here.local> {}
say [R.^ver, R.^auth];
# OUTPUT«[v4.2.3 me@here.local]␤»
=head2 C<enum>
X<|Enumeration; Enums; enum>
Expand Down Expand Up @@ -251,14 +271,47 @@ Returns a list with key and value of the enum-pair.
TODO
=head3 Versioning and Authership
Versioning and authership can be applied via adverbs C«:ver<>» and C«:auth<>.
Both take a string as argument, for C<:ver> the string is converted to a
L<Version|/type/Version> object. To query a modules version and auther use
C<.^ver> and C<^.auth>.
module M:ver<4.2.3>:auth<me@here.local> {}
say [M.^ver, M.^auth];
# OUTPUT«[v4.2.3 me@here.local]␤»
=head2 C<package>
=head3 Versioning and Authership
TODO
Versioning and authership can be applied via adverbs C«:ver<>» and C«:auth<>.
Both take a string as argument, for C<:ver> the string is converted to a
L<Version|/type/Version> object. To query a packages version and auther use
C<.^ver> and C<^.auth>.
package P:ver<4.2.3>:auth<me@here.local> {}
say [P.^ver, P.^auth];
# OUTPUT«[v4.2.3 me@here.local]␤»
=head2 C<grammar>
TODO
=head3 Versioning and Authership
Versioning and authership can be applied via adverbs C«:ver<>» and C«:auth<>.
Both take a string as argument, for C<:ver> the string is converted to a
L<Version|/type/Version> object. To query a grammars version and auther use
C<.^ver> and C<^.auth>.
grammar G:ver<4.2.3>:auth<me@here.local> {}
say [G.^ver, G.^auth];
# OUTPUT«[v4.2.3 me@here.local]␤»
=head2 C<subset>
A X<C<subset>|subset> declares a new type that will re-dispatch to its base
Expand Down

0 comments on commit 845d9dd

Please sign in to comment.