aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-07 00:29:29 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-07 00:29:29 +1300
commite7e58d116b7cf7579485d3877de152a50b73b588 (patch)
tree4d62f96d1fdc79eb5070c9e1b5eef5f10f5c949e
parent8dab57269cd778fd00a05025c4b2f94446ee400c (diff)
downloadList-Breakdown-e7e58d116b7cf7579485d3877de152a50b73b588.tar.gz
Rebuild README.markdown
-rw-r--r--README.markdown34
1 files changed, 17 insertions, 17 deletions
diff --git a/README.markdown b/README.markdown
index 5473dec..5eb1b99 100644
--- a/README.markdown
+++ b/README.markdown
@@ -4,7 +4,7 @@ List::Breakdown - Build sublist structures matching conditions
# VERSION
-Version 0.17
+Version 0.19
# SYNOPSIS
@@ -92,7 +92,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 **pattern syntax**, which
@@ -102,7 +102,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:
@@ -114,17 +114,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
@@ -177,27 +177,27 @@ For our sample data above, this would yield the following structure in
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 => [],
}
)
@@ -231,11 +231,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 ],
},
);