-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
47 lines (36 loc) · 1.41 KB
/
README
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
NAME
TOML - Parser for Tom's Obvious, Minimal Language.
SYNOPSIS
use TOML qw(from_toml to_toml);
# Parsing toml
my $toml = slurp("~/.foo.toml");
my $data = from_toml($toml);
# With error checking
my ($data, $err) = from_toml($toml);
unless ($data) {
die "Error parsing toml: $err";
}
# Creating toml
my $toml = to_toml($data);
DESCRIPTION
"TOML" implements a parser for Tom's Obvious, Minimal Language, as
defined at <https://github.com/mojombo/toml>. "TOML" exports two
subroutines, "from_toml" and "to_toml",
FUNCTIONS
from_toml
"from_toml" transforms a string containing toml to a perl data
structure or vice versa. This data structure complies with the tests
provided at <https://github.com/mojombo/toml/tree/master/tests>.
If called in list context, "from_toml" produces a ("hash",
"error_string") tuple, where "error_string" is "undef" on
non-errors. If there is an error, then "hash" will be undefined and
"error_string" will contains (scant) details about said error.
to_toml
"to_toml" transforms a perl data structure into toml-formatted
string.
AUTHOR
Darren Chamberlain <[email protected]>
CONTRIBUTORS
Tokuhiro Matsuno <[email protected]>
Matthias Bethke <[email protected]>
Sergey Romanov <[email protected]>