@@ -536,17 +536,21 @@ attributes is not yet implemented. Please note that adding a multi candidate
536
536
that differs only in its named parameters will add that candidate behind the
537
537
already defined one and as such it won't be picked by the dispatcher.
538
538
539
- = head3 Versioning and authorship
540
-
541
- Versioning and authorship can be applied via the adverbs
542
- X « C « :ver<> » |:ver<> (class)» and X « C « :auth<> » |:auth<> (class)» .
543
- Both take a string as argument, for C < :ver > the string is converted to a
544
- L < Version|/type/Version > object. To query a class version and author use
545
- C < .^ver > and C < ^.auth > .
546
-
547
- class C:ver<4.2.3>:auth<me@here.local> {}
548
- say [C.^ver, C.^auth];
549
- # OUTPUT: «[v4.2.3 me@here.local]»
539
+ = head3 Versioning, authorship, and API
540
+
541
+ Versioning, authorship, and API can be applied via the adverbs
542
+ X « C « :ver<> » |:ver<> (class)» , X « C « :auth<> » |:auth<> (class)» , and
543
+ X « C « :api<> » |:api<> (class)» respectively. All of them take a string as argument;
544
+ for C < :ver > the string is converted to a L < Version|/type/Version > object,
545
+ and for C < :api > the string is converted into the allomorph
546
+ L « C « IntStr » |/type/IntStr» . To query a class about its version, author, and API
547
+ use C < .^ver > , C < .^auth > , and C < .^api > respectively.
548
+
549
+ class C:ver<4.2.3>:auth<me@here.local>:api<1> {}
550
+ say C.^ver; # OUTPUT: «v4.2.3»
551
+ say C.^ver.parts; # OUTPUT: «(4 2 3)»
552
+ say C.^auth; # OUTPUT: «me@here.local»
553
+ say C.^api; # OUTPUT: «1»
550
554
551
555
= head2 C < role >
552
556
@@ -686,17 +690,21 @@ say [(75kg).^name, N(75kg).^name];
686
690
# OUTPUT: «[Int+{SI-kilogram} Rat+{SI-Newton}]»
687
691
= end code
688
692
689
- = head3 Versioning and authorship
693
+ = head3 Versioning, authorship, and API
690
694
691
- Versioning and authorship can be applied via the adverbs
692
- X « C « :ver<> » |:ver<> (role)» and X « C « :auth<> » |:auth<> (role)» .
693
- Both take a string as argument, for C < :ver > the string is converted to a
694
- L < Version|/type/Version > object. To query a role's version and author use
695
- C < .^ver > and C < ^.auth > .
695
+ Versioning, authorship, and API can be applied via the adverbs
696
+ X « C « :ver<> » |:ver<> (role)» , X « C « :auth<> » |:auth<> (role)» , and
697
+ X « C « :api<> » |:api<> (role)» respectively. All of them take a string as argument;
698
+ for C < :ver > the string is converted to a L < Version|/type/Version > object,
699
+ and for C < :api > the string is converted into the allomorph
700
+ L « C « IntStr » |/type/IntStr» . To query a role's version, author, and API
701
+ use C < .^ver > , C < .^auth > , and C < .^api > respectively.
696
702
697
- role R:ver<4.2.3>:auth<me@here.local> {}
698
- say [R.^ver, R.^auth];
699
- # OUTPUT: «[v4.2.3 me@here.local]»
703
+ class R:ver<4.2.3>:auth<me@here.local>:api<1> {}
704
+ say R.^ver; # OUTPUT: «v4.2.3»
705
+ say R.^ver.parts; # OUTPUT: «(4 2 3)»
706
+ say R.^auth; # OUTPUT: «me@here.local»
707
+ say R.^api; # OUTPUT: «1»
700
708
701
709
X < |Enumeration; Enums; enum >
702
710
= head2 C < enum >
@@ -900,16 +908,20 @@ another Raku program.
900
908
901
909
For a full explanation see L < Modules|/language/modules > .
902
910
903
- = head3 Versioning and authorship
911
+ = head3 Versioning, authorship, and API
904
912
905
- Versioning and authorship can be applied via the adverbs C « :ver<> » and C « :auth<> » .
906
- Both take a string as argument, for C < :ver > the string is converted to a
907
- L < Version|/type/Version > object. To query a modules version and author use
908
- C < .^ver > and C < ^.auth > .
913
+ Versioning, authorship, and API can be applied via the adverbs
914
+ C « :ver<> » , C « :auth<> » , and C « :api<> » respectively. All of them take a string as
915
+ argument; for C < :ver > the string is converted to a L < Version|/type/Version > object,
916
+ and for C < :api > the string is converted into the allomorph
917
+ L « C « IntStr » |/type/IntStr» . To query a module's version, author, and API
918
+ use C < .^ver > , C < .^auth > , and C < .^api > respectively.
909
919
910
- module M:ver<4.2.3>:auth<me@here.local> {}
911
- say [M.^ver, M.^auth];
912
- # OUTPUT: «[v4.2.3 me@here.local]»
920
+ class M:ver<4.2.3>:auth<me@here.local>:api<1> {}
921
+ say M.^ver; # OUTPUT: «v4.2.3»
922
+ say M.^ver.parts; # OUTPUT: «(4 2 3)»
923
+ say M.^auth; # OUTPUT: «me@here.local»
924
+ say M.^api; # OUTPUT: «1»
913
925
914
926
= head2 C < package >
915
927
@@ -926,17 +938,21 @@ are classes.
926
938
927
939
For a full explanation see L < Grammars|/language/grammars > .
928
940
929
- = head3 Versioning and authorship
930
-
931
- Versioning and authorship can be applied via the adverbs
932
- X « C « :ver<> » |:ver<> (grammar)» and X « C « :auth<> » |:auth<> (grammar)» .
933
- Both take a string as argument, for C < :ver > the string is converted to a
934
- L < Version|/type/Version > object. To query a grammars version and author use
935
- C < .^ver > and C < ^.auth > .
936
-
937
- grammar G:ver<4.2.3>:auth<me@here.local> {}
938
- say [G.^ver, G.^auth];
939
- # OUTPUT: «[v4.2.3 me@here.local]»
941
+ = head3 Versioning, authorship, and API
942
+
943
+ Versioning, authorship, and API can be applied via the adverbs
944
+ X « C « :ver<> » |:ver<> (grammar)» , X « C « :auth<> » |:auth<> (grammar)» , and
945
+ X « C « :api<> » |:api<> (grammar)» respectively. All of them take a string as argument;
946
+ for C < :ver > the string is converted to a L < Version|/type/Version > object,
947
+ and for C < :api > the string is converted into the allomorph
948
+ L « C « IntStr » |/type/IntStr» . To query a grammar about its version, author, and API
949
+ use C < .^ver > , C < .^auth > , and C < .^api > respectively.
950
+
951
+ class G:ver<4.2.3>:auth<me@here.local>:api<1> {}
952
+ say G.^ver; # OUTPUT: «v4.2.3»
953
+ say G.^ver.parts; # OUTPUT: «(4 2 3)»
954
+ say G.^auth; # OUTPUT: «me@here.local»
955
+ say G.^api; # OUTPUT: «1»
940
956
941
957
= head2 C < subset >
942
958
0 commit comments