| 1 | package TOML::XS::Document; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | =encoding utf-8 | ||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | TOML::XS::Document - Object representation of a L<TOML|https://toml.io> document | ||
| 11 | |||
| 12 | =head1 SYNOPSIS | ||
| 13 | |||
| 14 | See L<TOML::XS>. | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | Instances of this class represent a parse of a TOML document. | ||
| 19 | |||
| 20 | This class is not directly instantiable. | ||
| 21 | |||
| 22 | =head1 METHODS | ||
| 23 | |||
| 24 | =head2 $what = I<OBJ>->get( @POINTER ) | ||
| 25 | |||
| 26 | Returns some part of the parsed TOML document as a Perl scalar. | ||
| 27 | |||
| 28 | If @POINTER is empty, then the return will be the entire parsed TOML | ||
| 29 | document, represented as a hash reference. | ||
| 30 | |||
| 31 | @POINTER, if given, refers to some part of the document: $POINTER[0] | ||
| 32 | is a key in the document’s top-level table, $POINTER[1] references | ||
| 33 | some piece of the structure beneath it, etc. If @POINTER refers to a | ||
| 34 | nonexistent part of the document then a suitable exception is thrown. | ||
| 35 | |||
| 36 | All elements of @POINTER must be I<character> strings. | ||
| 37 | |||
| 38 | As of now thrown exceptions are simple character strings | ||
| 39 | that include, where relevant, a | ||
| 40 | L<JSON pointer|https://tools.ietf.org/html/rfc6901> to the problematic | ||
| 41 | data point. | ||
| 42 | |||
| 43 | For historical reasons this may also be called C<parse>. | ||
| 44 | |||
| 45 | =cut | ||
| 46 | |||
| 47 | 1; |