Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add another list example
  • Loading branch information
tbrowder committed Oct 20, 2018
1 parent 7bd303c commit 2eed8fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/Language/pod.pod6
Expand Up @@ -50,7 +50,7 @@ Perl6-ish option pairs. That is, any of:
=begin table
Value is... Specify with... Or with... Or with...
=============== =================== ============== ===========
List :key[$e1, $e2, ...] :key($e1, $e2, ...)
List :key[$e1, $e2, ...] :key($e1, $e2, ...) :key<$e1 $e2 ...>
Hash :key{$k1=>$v1, $k2=>$v2}
Boolean (true) :key :key(True) :key[True]
Boolean (false) :!key :key(False) :key[False]
Expand All @@ -69,7 +69,8 @@ are values of type String, Int, Number, or Boolean.
Strings are delimited by single or double quotes. Whitespace is insignificant outside
of strings. Hash keys need not be quote-delimited unless they contain
significant whitespace.
significant whitespace. Strings entered inside angle brackets become lists when
whitespace is used inside the brackets.
All option keys and values must, of course, be constants since Pod is a
specification language, not a programming language. Specifically, option
Expand Down

5 comments on commit 2eed8fc

@b2gills
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That example is confusing, because that will pass in strings "$e1" and "$e2"

> dd (:key("\$e1", "\$e2", "..."))
:key(("\$e1", "\$e2", "..."))

@tbrowder
Copy link
Member Author

@tbrowder tbrowder commented on 2eed8fc Oct 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be a no-test example. The text following says what the $eN's mean, they're constants of various types (Str, Int or Num) as appropriate for the container.

@b2gills
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you are saying that we should allow examples which are not valid Perl 6.

@JJ
Copy link
Contributor

@JJ JJ commented on 2eed8fc Oct 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, those examples are used all the time to show, for instance, what is not valid Perl 6. There's a provision for that when testing examples in the shape of a :skip-test attribute.

@tbrowder
Copy link
Member Author

@tbrowder tbrowder commented on 2eed8fc Oct 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@b2gills example I don't think is correct. The dd... was in the REPL and not an actual config example. If I can't get a real example config to work, then I will change the "$eN"'s to something like 'Cn' (and ":skip-test"). The fact that the example is a table definitely requires a ":skip-test" since the table cells are NOT %config entries--much different parsing!

Note it may help to use just a few examples in a real pod %config. I'll work on that, too.

Please sign in to comment.