File: quoting.tml

package info (click to toggle)
libyaml-tiny-perl 1.64-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 556 kB
  • ctags: 80
  • sloc: perl: 1,363; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
=== Quote boolean-like string (scalar)
# Strings that could be confused with booleans should be quoted
--- perl
[ 'true' ]

--- yaml
\--- 'true'

=== Quote boolean-like string (list)
--- perl
[ [ qw{ null true false } ] ]

--- yaml
\---
- 'null'
- 'true'
- 'false'

=== Quote scalars ending in colon
--- perl
[ [ 'A:' ] ]

--- yaml
\---
- 'A:'