aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-06 21:34:19 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-06 21:45:31 +1300
commita68473d9d9b23c8877d38ad1b4c9fc66a0f17547 (patch)
treef4e655f1ca43d63e2fbb0927e0a7fc93ae180952
parent8dfec56644f42dbbbb03955d26aa423e2f83818f (diff)
downloadList-Breakdown-a68473d9d9b23c8877d38ad1b4c9fc66a0f17547.tar.gz
Restore trailing commas to documentation
I had the idea it was better to leave them out, but I'm just confusing myself
-rw-r--r--lib/List/Breakdown.pm32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/List/Breakdown.pm b/lib/List/Breakdown.pm
index 1543f6a..275eaaa 100644
--- a/lib/List/Breakdown.pm
+++ b/lib/List/Breakdown.pm
@@ -197,7 +197,7 @@ imperfect Perl parser:
"NEW CUSTOMER John O''Connor\r 2017-01-01",
"RETURNING CUSTOMER\tXah Zhang 2016-01-01",
"CHECK ACCOUNT Pierre d'Alun 2016-12-01",
- "RETURNING CUSTOMER Aaron Carter 2016-05-01"
+ "RETURNING CUSTOMER Aaron Carter 2016-05-01",
);
You could have a bucket structure like this, using the B<pattern syntax>, which
@@ -207,7 +207,7 @@ catches certain error types you've seen before for review:
bad_whitespace => qr/ [\r\t] /msx,
apostrophes => qr/ ' /msx,
double_apostrophes => qr/ '' /msx,
- not_ascii => qr/ [^[:ascii:]] /msx
+ not_ascii => qr/ [^[:ascii:]] /msx,
};
Applying the bucket structure like so:
@@ -219,17 +219,17 @@ The result set would look like this:
my %expected = (
bad_whitespace => [
"NEW CUSTOMER John O''Connor\r 2017-01-01",
- "RETURNING CUSTOMER\tXah Lee 2016-01-01"
+ "RETURNING CUSTOMER\tXah Lee 2016-01-01",
],
apostrophes => [
"NEW CUSTOMER John O''Connor\r 2017-01-01",
- 'CHECK ACCOUNT Pierre d\'Alun 2016-12-01'
+ 'CHECK ACCOUNT Pierre d\'Alun 2016-12-01',
],
double_apostrophes => [
- "NEW CUSTOMER John O''Connor\r 2017-01-01"
+ "NEW CUSTOMER John O''Connor\r 2017-01-01",
],
not_ascii => [
- ]
+ ],
);
Notice that some of the lines appear in more than one list, and that the
@@ -282,27 +282,27 @@ C<%results>:
ok => [
{
hostname => 'webserver1',
- status => 'OK'
+ status => 'OK',
},
{
hostname => 'webserver4',
- status => 'OK'
- }
+ status => 'OK',
+ },
],
problem => {
warning => [
{
hostname => 'webserver3',
- status => 'WARNING'
- }
+ status => 'WARNING',
+ },
],
critical => [
{
hostname => 'webserver2',
- status => 'CRITICAL'
- }
+ status => 'CRITICAL',
+ },
],
- unknown => []
+ unknown => [],
}
)
@@ -336,11 +336,11 @@ Applying the bucket structure like so:
The result set would look like this:
my %expected = (
- negative => [ -5 ]
+ negative => [ -5 ],
positive => {
small => [ 1, 3.14 ],
medium => [ 32, 86 ],
- large => [ 3_718.4, 511, 120_000 ]
+ large => [ 3_718.4, 511, 120_000 ],
},
);