@@ -46,16 +46,28 @@ different ways by different types of blocks, but is always specified using
46
46
Perl6-ish option pairs. That is, any of:
47
47
48
48
= begin table
49
- Value is... Specify with... Or with... Or with...
50
- =============== =================== ============== ==============
51
- Boolean (true) :key :key(True )
52
- Boolean (false) :!key :key(False)
53
- String :key<str> :key('str') :key("str" )
54
- Number :key(23) :key(4.6 )
55
- List :key[1, 'b', 3] # not yet implemented
56
- Hash :key{a=>1, b=>'x'} # not yet implemented
49
+ Value is... Specify with... Or with... Or with...
50
+ =============== =================== ============== ===========
51
+ List :key[$e1,$e2,...] :key($e1,$e2,... )
52
+ Hash :key{$k1=>$v1,$k2=>$v2}
53
+ Boolean (true) :key :key(True )
54
+ Boolean (false) :!key :key(False )
55
+ String :key<str> :key('str') :key("str")
56
+ Number :key(42) :key(2.3)
57
57
= end table
58
58
59
+ Where '$e1,$e2,...' are list elements of type Str, Int, Num, or
60
+ Bool. Lists may have mixed element types. Note that one-element
61
+ lists are converted to the type of their element (Str, Int, Num, or
62
+ Bool).
63
+
64
+ For hashes, '$k1,$k2,...' are keys of type Str and '$v1,$2,...'
65
+ are values of type Str, Int, Num, or Bool.
66
+
67
+ Strings may use any of the single Q/q quote constructs, e.g.,
68
+ :key(Q[str]), which is equivalent to the :key<str> format and
69
+ results in an uninterpreted string literal.
70
+
59
71
All option keys and values must, of course, be constants since Pod is a
60
72
specification language, not a programming language. Specifically, option
61
73
values cannot be closures. See Synopsis 2 for details of the various
0 commit comments