TOML-Tiny-0.15000755001750001750 014105470632 13444 5ustar00sysreadsysread000000000000tags100644001750001750 723214105470632 14412 0ustar00sysreadsysread000000000000TOML-Tiny-0.15!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.9~svn20110310 // ARRAY lib/TOML/Tiny/Writer.pm /^ ARRAY: for my $k (grep{ ref $data->{$_} eq 'ARRAY' } sort keys %$data) {$/;" l TOKEN lib/TOML/Tiny/Parser.pm /^ TOKEN: while (my $token = $self->next_token) {$/;" l TOML::Tiny lib/TOML/Tiny.pm /^package TOML::Tiny;$/;" p TOML::Tiny::Grammar lib/TOML/Tiny/Grammar.pm /^package TOML::Tiny::Grammar;$/;" p TOML::Tiny::Parser lib/TOML/Tiny/Parser.pm /^package TOML::Tiny::Parser;$/;" p TOML::Tiny::Tokenizer lib/TOML/Tiny/Tokenizer.pm /^package TOML::Tiny::Tokenizer;$/;" p TOML::Tiny::Util lib/TOML/Tiny/Util.pm /^package TOML::Tiny::Util;$/;" p TOML::Tiny::Writer lib/TOML/Tiny/Writer.pm /^package TOML::Tiny::Writer;$/;" p build_negpath_test_files build-tests.pl /^sub build_negpath_test_files{$/;" s build_pospath_test_files build-tests.pl /^sub build_pospath_test_files{$/;" s current_line lib/TOML/Tiny/Tokenizer.pm /^sub current_line {$/;" s deannotate build-tests.pl /^sub deannotate{$/;" s decode lib/TOML/Tiny.pm /^sub decode {$/;" s deturd_json build-tests.pl /^sub deturd_json{$/;" s encode lib/TOML/Tiny.pm /^sub encode {$/;" s error lib/TOML/Tiny/Tokenizer.pm /^sub error {$/;" s expect_type lib/TOML/Tiny/Parser.pm /^sub expect_type {$/;" s from_toml lib/TOML/Tiny.pm /^sub from_toml {$/;" s get_keys lib/TOML/Tiny/Parser.pm /^sub get_keys {$/;" s inflate_float lib/TOML/Tiny/Parser.pm /^sub inflate_float {$/;" s inflate_integer lib/TOML/Tiny/Parser.pm /^sub inflate_integer {$/;" s is_strict_array lib/TOML/Tiny/Util.pm /^sub is_strict_array {$/;" s new lib/TOML/Tiny.pm /^sub new {$/;" s new lib/TOML/Tiny/Parser.pm /^sub new {$/;" s new lib/TOML/Tiny/Tokenizer.pm /^sub new {$/;" s next_token lib/TOML/Tiny/Parser.pm /^sub next_token {$/;" s next_token lib/TOML/Tiny/Tokenizer.pm /^sub next_token {$/;" s parse lib/TOML/Tiny.pm /^sub parse {$/;" s parse lib/TOML/Tiny/Parser.pm /^sub parse {$/;" s parse_array_table lib/TOML/Tiny/Parser.pm /^sub parse_array_table {$/;" s parse_error lib/TOML/Tiny/Parser.pm /^sub parse_error {$/;" s parse_inline_array lib/TOML/Tiny/Parser.pm /^sub parse_inline_array {$/;" s parse_inline_table lib/TOML/Tiny/Parser.pm /^sub parse_inline_table {$/;" s parse_key lib/TOML/Tiny/Parser.pm /^sub parse_key {$/;" s parse_table lib/TOML/Tiny/Parser.pm /^sub parse_table {$/;" s parse_value lib/TOML/Tiny/Parser.pm /^sub parse_value {$/;" s pop_keys lib/TOML/Tiny/Parser.pm /^sub pop_keys {$/;" s push_keys lib/TOML/Tiny/Parser.pm /^sub push_keys {$/;" s scan_to_key lib/TOML/Tiny/Parser.pm /^sub scan_to_key {$/;" s set_keys lib/TOML/Tiny/Parser.pm /^sub set_keys {$/;" s slurp build-tests.pl /^sub slurp{$/;" s strftime_rfc3339 lib/TOML/Tiny/Writer.pm /^sub strftime_rfc3339 {$/;" s to_toml lib/TOML/Tiny.pm /^sub to_toml {$/;" s to_toml lib/TOML/Tiny/Writer.pm /^sub to_toml {$/;" s to_toml_key lib/TOML/Tiny/Writer.pm /^sub to_toml_key {$/;" s to_toml_string lib/TOML/Tiny/Writer.pm /^sub to_toml_string {$/;" s tokenize_float lib/TOML/Tiny/Tokenizer.pm /^sub tokenize_float {$/;" s tokenize_integer lib/TOML/Tiny/Tokenizer.pm /^sub tokenize_integer {$/;" s tokenize_key lib/TOML/Tiny/Tokenizer.pm /^sub tokenize_key {$/;" s tokenize_string lib/TOML/Tiny/Tokenizer.pm /^sub tokenize_string {$/;" s unescape_chars lib/TOML/Tiny/Tokenizer.pm /^sub unescape_chars {$/;" s unescape_str lib/TOML/Tiny/Tokenizer.pm /^sub unescape_str {$/;" s update_position lib/TOML/Tiny/Tokenizer.pm /^sub update_position {$/;" s README100644001750001750 56614105470632 14374 0ustar00sysreadsysread000000000000TOML-Tiny-0.15This archive contains the distribution TOML-Tiny, version 0.15: a minimal, pure perl TOML parser and serializer This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v6.017. Changes100644001750001750 666214105470632 15032 0ustar00sysreadsysread000000000000TOML-Tiny-0.150.15 2021-08-13 - bugfix: strings with "inf" or "nan" in them no longer treated as special floats 0.14 2021-08-02 - Fix an issue with serialisation of nan, inf, and -inf (thanks jjatria) - Enforcement of homogenous arrays is no longer supported as it has been dropped from the TOML spec - strict_arrays is now strict (strict_arrays still accepted for compatibility) - strict mode now disallows trailing commas - bugfix: table names whose individual segments include a dot can no longer cause parser to incorrectly identify duplicate table names - bugfix: correctly fail on arrays without separators - bugfix: correctly fail when array ends without closing at EOF - bugfix: correctly fail when inline table is missing separators or has trailing separator - bugfix: disallow non-permitted control characters in strings and comments - bugfix: disallow invalid unicode in input - bugfix: allow double-zero exponents (e00) - bugfix: correctly parse multi-line literal strings, dealing properly with some edge cases - bugfix: correctly parse multi-line basic strings, dealing properly with some edge cases - bugfix: correctly escape unicode control characters in toml output - bugfix: correctly handle comment-like sequences in multiline strings - bugfix: correctly handle keys with names that are toml keywords - bugfix: better handling of inf/nan in parsing, writing - bugfix: correctly generate empty inline tables within arrays - bugfix: make duplicate key enforcement match the toml 1.0 spec - bugfix: update datetime support to match toml abnf, w/ workaround for burntsushi tests supporting lowercase z and toml supporting a space instead of T - bugfix: fix support for local dates, local times, fractional second precision - bugfix: fix parsing of dotted keys in inline tables - bugfix: fixes for escapes and unicode in key names, both in parsing and generating toml 0.13 2021-07-26 -Fix a spurious warning being raised on trailing spaces in hexadecimal numbers (thanks jjatria) 0.12 2021-05-28 -Fix bug causing to_toml to incorrectly dereference \1 and \0 (thanks oschwald) 0.11 2021-02-12 -Fix bug in strict_arrays where string containing integer is recognized as an integer, causing parsing to fail when present in an array containing other strings 0.10 2020-09-08 -Remove dependency on DateTime::Format::RFC3339 0.09 2020-08-11 -Fix warning when calling `to_toml(from_toml(...))` -Fix bug allowing perl to stringify numbers (thanks oschwald) -Fix bug disallowing weird forms of nan (+nan, -nan) -Behavior change: return Math::Big(Int|Float) for large numbers (thanks oschwald) 0.08 2020-06-25 -Fix bug in TOML table output generation (thanks ijackson) 0.07 2020-05-08 -Add support for floating time zones in TOML output (thanks ijackson) -Fix bug where datetimes were being outputed as ISO8601 instead of RFC3339 -Clarified documentation with explicit description of supported perl types for each toml type 0.06 2020-03-30 -Performance improvements in TOML::Tiny::Tokenizer->next_token -Fix totally broken OO interface (thanks noctux) 0.05 2020-01-21 -POD fixes for TOML::Tiny::Grammar 0.04 2020-01-21 -Remove superfluous dependency on DateTime::Format::RFC3339, which was only needed for unit tests 0.03 2020-01-18 -Remove automatic inflation of numerical types using Math::Big(Int|Float); this may now be done with inflate_integer and inflate_float 0.02 2020-01-17 -Add MANIFEST.SKIP to prevent dzil from including author scripts 0.01 2020-01-17 -Initial release LICENSE100644001750001750 4364414105470632 14565 0ustar00sysreadsysread000000000000TOML-Tiny-0.15This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2021 by Jeff Ober. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2021 by Jeff Ober. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End cpanfile100644001750001750 112514105470632 15230 0ustar00sysreadsysread000000000000TOML-Tiny-0.15requires 'perl' => '>= 5.018'; requires 'Carp' => '0'; requires 'Data::Dumper' => '0'; requires 'Exporter' => '0'; requires 'Encode' => '0'; requires 'Math::BigInt' => '>= 1.999718'; recommends 'Types::Serialiser' => 0; on test => sub{ requires 'Data::Dumper' => '0'; requires 'DateTime::Format::ISO8601' => '0'; requires 'TOML::Parser' => '0'; requires 'Test2::V0' => '0'; requires 'Test::Pod' => '0'; requires 'DateTime::Format::RFC3339' => '0'; recommends 'Unicode::GCString' => '0'; }; dist.ini100644001750001750 21114105470632 15143 0ustar00sysreadsysread000000000000TOML-Tiny-0.15name = TOML-Tiny author = Jeff Ober license = Perl_5 copyright_holder = Jeff Ober [@Author::BLUEFEET] [PodWeaver] META.yml100644001750001750 206514105470632 15001 0ustar00sysreadsysread000000000000TOML-Tiny-0.15--- abstract: 'a minimal, pure perl TOML parser and serializer' author: - 'Jeff Ober ' build_requires: Data::Dumper: '0' DateTime::Format::ISO8601: '0' DateTime::Format::RFC3339: '0' ExtUtils::MakeMaker: '0' File::Spec: '0' TOML::Parser: '0' Test2::V0: '0' Test::More: '0' Test::Pod: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: TOML-Tiny recommends: Types::Serialiser: '0' requires: Carp: '0' Data::Dumper: '0' Encode: '0' Exporter: '0' Math::BigInt: '1.999718' perl: '5.018' resources: bugtracker: https://github.com/sysread/TOML-Tiny/issues homepage: https://github.com/sysread/TOML-Tiny repository: https://github.com/sysread/TOML-Tiny.git version: '0.15' x_generated_by_perl: v5.32.0 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' MANIFEST100644001750001750 6033614105470632 14706 0ustar00sysreadsysread000000000000TOML-Tiny-0.15# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017. Changes Dockerfile LICENSE MANIFEST MANIFEST.SKIP META.json META.yml Makefile.PL README cpanfile dist.ini lib/TOML/Tiny.pm lib/TOML/Tiny/Grammar.pm lib/TOML/Tiny/Parser.pm lib/TOML/Tiny/Tokenizer.pm lib/TOML/Tiny/Util.pm lib/TOML/Tiny/Writer.pm t/00-report-prereqs.dd t/00-report-prereqs.t t/author-pod-syntax.t t/numbers.t t/parity.t t/parser.t t/strict_arrays.t t/toml-test/invalid/array/missing-separator.t t/toml-test/invalid/array/missing-separator.toml t/toml-test/invalid/array/no-close-2.t t/toml-test/invalid/array/no-close-2.toml t/toml-test/invalid/array/no-close-table-2.t t/toml-test/invalid/array/no-close-table-2.toml t/toml-test/invalid/array/no-close-table.t t/toml-test/invalid/array/no-close-table.toml t/toml-test/invalid/array/no-close.t t/toml-test/invalid/array/no-close.toml t/toml-test/invalid/array/tables-1.t t/toml-test/invalid/array/tables-1.toml t/toml-test/invalid/array/tables-2.t t/toml-test/invalid/array/tables-2.toml t/toml-test/invalid/array/text-after-array-entries.t t/toml-test/invalid/array/text-after-array-entries.toml t/toml-test/invalid/array/text-before-array-separator.t t/toml-test/invalid/array/text-before-array-separator.toml t/toml-test/invalid/array/text-in-array.t t/toml-test/invalid/array/text-in-array.toml t/toml-test/invalid/bool/mixed-case.t t/toml-test/invalid/bool/mixed-case.toml t/toml-test/invalid/bool/wrong-case-false.t t/toml-test/invalid/bool/wrong-case-false.toml t/toml-test/invalid/bool/wrong-case-true.t t/toml-test/invalid/bool/wrong-case-true.toml t/toml-test/invalid/control/comment-del.t t/toml-test/invalid/control/comment-del.toml t/toml-test/invalid/control/comment-lf.t t/toml-test/invalid/control/comment-lf.toml t/toml-test/invalid/control/comment-null.t t/toml-test/invalid/control/comment-null.toml t/toml-test/invalid/control/comment-us.t t/toml-test/invalid/control/comment-us.toml t/toml-test/invalid/control/multi-del.t t/toml-test/invalid/control/multi-del.toml t/toml-test/invalid/control/multi-lf.t t/toml-test/invalid/control/multi-lf.toml t/toml-test/invalid/control/multi-null.t t/toml-test/invalid/control/multi-null.toml t/toml-test/invalid/control/multi-us.t t/toml-test/invalid/control/multi-us.toml t/toml-test/invalid/control/rawmulti-del.t t/toml-test/invalid/control/rawmulti-del.toml t/toml-test/invalid/control/rawmulti-lf.t t/toml-test/invalid/control/rawmulti-lf.toml t/toml-test/invalid/control/rawmulti-null.t t/toml-test/invalid/control/rawmulti-null.toml t/toml-test/invalid/control/rawmulti-us.t t/toml-test/invalid/control/rawmulti-us.toml t/toml-test/invalid/control/rawstring-del.t t/toml-test/invalid/control/rawstring-del.toml t/toml-test/invalid/control/rawstring-lf.t t/toml-test/invalid/control/rawstring-lf.toml t/toml-test/invalid/control/rawstring-null.t t/toml-test/invalid/control/rawstring-null.toml t/toml-test/invalid/control/rawstring-us.t t/toml-test/invalid/control/rawstring-us.toml t/toml-test/invalid/control/string-bs.t t/toml-test/invalid/control/string-bs.toml t/toml-test/invalid/control/string-del.t t/toml-test/invalid/control/string-del.toml t/toml-test/invalid/control/string-lf.t t/toml-test/invalid/control/string-lf.toml t/toml-test/invalid/control/string-null.t t/toml-test/invalid/control/string-null.toml t/toml-test/invalid/control/string-us.t t/toml-test/invalid/control/string-us.toml t/toml-test/invalid/datetime/impossible-date.t t/toml-test/invalid/datetime/impossible-date.toml t/toml-test/invalid/datetime/no-leads-with-milli.t t/toml-test/invalid/datetime/no-leads-with-milli.toml t/toml-test/invalid/datetime/no-leads.t t/toml-test/invalid/datetime/no-leads.toml t/toml-test/invalid/datetime/no-secs.t t/toml-test/invalid/datetime/no-secs.toml t/toml-test/invalid/datetime/no-t.t t/toml-test/invalid/datetime/no-t.toml t/toml-test/invalid/datetime/trailing-t.t t/toml-test/invalid/datetime/trailing-t.toml t/toml-test/invalid/encoding/bad-utf8-at-end.t t/toml-test/invalid/encoding/bad-utf8-at-end.toml t/toml-test/invalid/encoding/bad-utf8-in-comment.t t/toml-test/invalid/encoding/bad-utf8-in-comment.toml t/toml-test/invalid/encoding/bad-utf8-in-string.t t/toml-test/invalid/encoding/bad-utf8-in-string.toml t/toml-test/invalid/encoding/bom-not-at-start-1.t t/toml-test/invalid/encoding/bom-not-at-start-1.toml t/toml-test/invalid/encoding/bom-not-at-start-2.t t/toml-test/invalid/encoding/bom-not-at-start-2.toml t/toml-test/invalid/encoding/utf16-bom.t t/toml-test/invalid/encoding/utf16-bom.toml t/toml-test/invalid/encoding/utf16.t t/toml-test/invalid/encoding/utf16.toml t/toml-test/invalid/float/double-point-1.t t/toml-test/invalid/float/double-point-1.toml t/toml-test/invalid/float/double-point-2.t t/toml-test/invalid/float/double-point-2.toml t/toml-test/invalid/float/exp-double-e-1.t t/toml-test/invalid/float/exp-double-e-1.toml t/toml-test/invalid/float/exp-double-e-2.t t/toml-test/invalid/float/exp-double-e-2.toml t/toml-test/invalid/float/exp-double-us.t t/toml-test/invalid/float/exp-double-us.toml t/toml-test/invalid/float/exp-leading-us.t t/toml-test/invalid/float/exp-leading-us.toml t/toml-test/invalid/float/exp-point-1.t t/toml-test/invalid/float/exp-point-1.toml t/toml-test/invalid/float/exp-point-2.t t/toml-test/invalid/float/exp-point-2.toml t/toml-test/invalid/float/exp-trailing-us.t t/toml-test/invalid/float/exp-trailing-us.toml t/toml-test/invalid/float/inf-incomplete-1.t t/toml-test/invalid/float/inf-incomplete-1.toml t/toml-test/invalid/float/inf-incomplete-2.t t/toml-test/invalid/float/inf-incomplete-2.toml t/toml-test/invalid/float/inf-incomplete-3.t t/toml-test/invalid/float/inf-incomplete-3.toml t/toml-test/invalid/float/inf_underscore.t t/toml-test/invalid/float/inf_underscore.toml t/toml-test/invalid/float/leading-point-neg.t t/toml-test/invalid/float/leading-point-neg.toml t/toml-test/invalid/float/leading-point-plus.t t/toml-test/invalid/float/leading-point-plus.toml t/toml-test/invalid/float/leading-point.t t/toml-test/invalid/float/leading-point.toml t/toml-test/invalid/float/leading-us.t t/toml-test/invalid/float/leading-us.toml t/toml-test/invalid/float/leading-zero-neg.t t/toml-test/invalid/float/leading-zero-neg.toml t/toml-test/invalid/float/leading-zero-plus.t t/toml-test/invalid/float/leading-zero-plus.toml t/toml-test/invalid/float/leading-zero.t t/toml-test/invalid/float/leading-zero.toml t/toml-test/invalid/float/nan-incomplete-1.t t/toml-test/invalid/float/nan-incomplete-1.toml t/toml-test/invalid/float/nan-incomplete-2.t t/toml-test/invalid/float/nan-incomplete-2.toml t/toml-test/invalid/float/nan-incomplete-3.t t/toml-test/invalid/float/nan-incomplete-3.toml t/toml-test/invalid/float/nan_underscore.t t/toml-test/invalid/float/nan_underscore.toml t/toml-test/invalid/float/trailing-point-min.t t/toml-test/invalid/float/trailing-point-min.toml t/toml-test/invalid/float/trailing-point-plus.t t/toml-test/invalid/float/trailing-point-plus.toml t/toml-test/invalid/float/trailing-point.t t/toml-test/invalid/float/trailing-point.toml t/toml-test/invalid/float/trailing-us.t t/toml-test/invalid/float/trailing-us.toml t/toml-test/invalid/float/us-after-point.t t/toml-test/invalid/float/us-after-point.toml t/toml-test/invalid/float/us-before-point.t t/toml-test/invalid/float/us-before-point.toml t/toml-test/invalid/inline-table/double-comma.t t/toml-test/invalid/inline-table/double-comma.toml t/toml-test/invalid/inline-table/empty.t t/toml-test/invalid/inline-table/empty.toml t/toml-test/invalid/inline-table/linebreak-1.t t/toml-test/invalid/inline-table/linebreak-1.toml t/toml-test/invalid/inline-table/linebreak-2.t t/toml-test/invalid/inline-table/linebreak-2.toml t/toml-test/invalid/inline-table/linebreak-3.t t/toml-test/invalid/inline-table/linebreak-3.toml t/toml-test/invalid/inline-table/linebreak-4.t t/toml-test/invalid/inline-table/linebreak-4.toml t/toml-test/invalid/inline-table/no-comma.t t/toml-test/invalid/inline-table/no-comma.toml t/toml-test/invalid/inline-table/trailing-comma.t t/toml-test/invalid/inline-table/trailing-comma.toml t/toml-test/invalid/integer/capital-bin.t t/toml-test/invalid/integer/capital-bin.toml t/toml-test/invalid/integer/capital-hex.t t/toml-test/invalid/integer/capital-hex.toml t/toml-test/invalid/integer/capital-oct.t t/toml-test/invalid/integer/capital-oct.toml t/toml-test/invalid/integer/double-sign-nex.t t/toml-test/invalid/integer/double-sign-nex.toml t/toml-test/invalid/integer/double-sign-plus.t t/toml-test/invalid/integer/double-sign-plus.toml t/toml-test/invalid/integer/double-us.t t/toml-test/invalid/integer/double-us.toml t/toml-test/invalid/integer/invalid-bin.t t/toml-test/invalid/integer/invalid-bin.toml t/toml-test/invalid/integer/invalid-hex.t t/toml-test/invalid/integer/invalid-hex.toml t/toml-test/invalid/integer/invalid-oct.t t/toml-test/invalid/integer/invalid-oct.toml t/toml-test/invalid/integer/leading-us-bin.t t/toml-test/invalid/integer/leading-us-bin.toml t/toml-test/invalid/integer/leading-us-hex.t t/toml-test/invalid/integer/leading-us-hex.toml t/toml-test/invalid/integer/leading-us-oct.t t/toml-test/invalid/integer/leading-us-oct.toml t/toml-test/invalid/integer/leading-us.t t/toml-test/invalid/integer/leading-us.toml t/toml-test/invalid/integer/leading-zero-1.t t/toml-test/invalid/integer/leading-zero-1.toml t/toml-test/invalid/integer/leading-zero-2.t t/toml-test/invalid/integer/leading-zero-2.toml t/toml-test/invalid/integer/leading-zero-sign-1.t t/toml-test/invalid/integer/leading-zero-sign-1.toml t/toml-test/invalid/integer/leading-zero-sign-2.t t/toml-test/invalid/integer/leading-zero-sign-2.toml t/toml-test/invalid/integer/negative-bin.t t/toml-test/invalid/integer/negative-bin.toml t/toml-test/invalid/integer/negative-hex.t t/toml-test/invalid/integer/negative-hex.toml t/toml-test/invalid/integer/negative-oct.t t/toml-test/invalid/integer/negative-oct.toml t/toml-test/invalid/integer/positive-bin.t t/toml-test/invalid/integer/positive-bin.toml t/toml-test/invalid/integer/positive-hex.t t/toml-test/invalid/integer/positive-hex.toml t/toml-test/invalid/integer/positive-oct.t t/toml-test/invalid/integer/positive-oct.toml t/toml-test/invalid/integer/text-after-integer.t t/toml-test/invalid/integer/text-after-integer.toml t/toml-test/invalid/integer/trailing-us-bin.t t/toml-test/invalid/integer/trailing-us-bin.toml t/toml-test/invalid/integer/trailing-us-hex.t t/toml-test/invalid/integer/trailing-us-hex.toml t/toml-test/invalid/integer/trailing-us-oct.t t/toml-test/invalid/integer/trailing-us-oct.toml t/toml-test/invalid/integer/trailing-us.t t/toml-test/invalid/integer/trailing-us.toml t/toml-test/invalid/integer/us-after-bin.t t/toml-test/invalid/integer/us-after-bin.toml t/toml-test/invalid/integer/us-after-hex.t t/toml-test/invalid/integer/us-after-hex.toml t/toml-test/invalid/integer/us-after-oct.t t/toml-test/invalid/integer/us-after-oct.toml t/toml-test/invalid/key/after-array.t t/toml-test/invalid/key/after-array.toml t/toml-test/invalid/key/after-table.t t/toml-test/invalid/key/after-table.toml t/toml-test/invalid/key/after-value.t t/toml-test/invalid/key/after-value.toml t/toml-test/invalid/key/bare-invalid-character.t t/toml-test/invalid/key/bare-invalid-character.toml t/toml-test/invalid/key/dotted-redefine-table.t t/toml-test/invalid/key/dotted-redefine-table.toml t/toml-test/invalid/key/duplicate-keys.t t/toml-test/invalid/key/duplicate-keys.toml t/toml-test/invalid/key/duplicate.t t/toml-test/invalid/key/duplicate.toml t/toml-test/invalid/key/empty.t t/toml-test/invalid/key/empty.toml t/toml-test/invalid/key/escape.t t/toml-test/invalid/key/escape.toml t/toml-test/invalid/key/hash.t t/toml-test/invalid/key/hash.toml t/toml-test/invalid/key/multiline.t t/toml-test/invalid/key/multiline.toml t/toml-test/invalid/key/newline.t t/toml-test/invalid/key/newline.toml t/toml-test/invalid/key/no-eol.t t/toml-test/invalid/key/no-eol.toml t/toml-test/invalid/key/open-bracket.t t/toml-test/invalid/key/open-bracket.toml t/toml-test/invalid/key/partial-quoted.t t/toml-test/invalid/key/partial-quoted.toml t/toml-test/invalid/key/single-open-bracket.t t/toml-test/invalid/key/single-open-bracket.toml t/toml-test/invalid/key/space.t t/toml-test/invalid/key/space.toml t/toml-test/invalid/key/special-character.t t/toml-test/invalid/key/special-character.toml t/toml-test/invalid/key/start-bracket.t t/toml-test/invalid/key/start-bracket.toml t/toml-test/invalid/key/two-equals.t t/toml-test/invalid/key/two-equals.toml t/toml-test/invalid/key/two-equals2.t t/toml-test/invalid/key/two-equals2.toml t/toml-test/invalid/key/two-equals3.t t/toml-test/invalid/key/two-equals3.toml t/toml-test/invalid/key/without-value-1.t t/toml-test/invalid/key/without-value-1.toml t/toml-test/invalid/key/without-value-2.t t/toml-test/invalid/key/without-value-2.toml t/toml-test/invalid/string/bad-byte-escape.t t/toml-test/invalid/string/bad-byte-escape.toml t/toml-test/invalid/string/bad-codepoint.t t/toml-test/invalid/string/bad-codepoint.toml t/toml-test/invalid/string/bad-concat.t t/toml-test/invalid/string/bad-concat.toml t/toml-test/invalid/string/bad-escape.t t/toml-test/invalid/string/bad-escape.toml t/toml-test/invalid/string/bad-multiline.t t/toml-test/invalid/string/bad-multiline.toml t/toml-test/invalid/string/bad-slash-escape.t t/toml-test/invalid/string/bad-slash-escape.toml t/toml-test/invalid/string/bad-uni-esc.t t/toml-test/invalid/string/bad-uni-esc.toml t/toml-test/invalid/string/basic-byte-escapes.t t/toml-test/invalid/string/basic-byte-escapes.toml t/toml-test/invalid/string/basic-multiline-out-of-range-unicode-escape-1.t t/toml-test/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml t/toml-test/invalid/string/basic-multiline-out-of-range-unicode-escape-2.t t/toml-test/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml t/toml-test/invalid/string/basic-multiline-quotes.t t/toml-test/invalid/string/basic-multiline-quotes.toml t/toml-test/invalid/string/basic-multiline-unknown-escape.t t/toml-test/invalid/string/basic-multiline-unknown-escape.toml t/toml-test/invalid/string/basic-out-of-range-unicode-escape-1.t t/toml-test/invalid/string/basic-out-of-range-unicode-escape-1.toml t/toml-test/invalid/string/basic-out-of-range-unicode-escape-2.t t/toml-test/invalid/string/basic-out-of-range-unicode-escape-2.toml t/toml-test/invalid/string/basic-unknown-escape.t t/toml-test/invalid/string/basic-unknown-escape.toml t/toml-test/invalid/string/literal-multiline-quotes-1.t t/toml-test/invalid/string/literal-multiline-quotes-1.toml t/toml-test/invalid/string/literal-multiline-quotes-2.t t/toml-test/invalid/string/literal-multiline-quotes-2.toml t/toml-test/invalid/string/missing-quotes.t t/toml-test/invalid/string/missing-quotes.toml t/toml-test/invalid/string/multiline-escape-space.t t/toml-test/invalid/string/multiline-escape-space.toml t/toml-test/invalid/string/multiline-no-close-2.t t/toml-test/invalid/string/multiline-no-close-2.toml t/toml-test/invalid/string/multiline-no-close.t t/toml-test/invalid/string/multiline-no-close.toml t/toml-test/invalid/string/multiline-quotes-1.t t/toml-test/invalid/string/multiline-quotes-1.toml t/toml-test/invalid/string/multiline-quotes-2.t t/toml-test/invalid/string/multiline-quotes-2.toml t/toml-test/invalid/string/no-close.t t/toml-test/invalid/string/no-close.toml t/toml-test/invalid/string/text-after-string.t t/toml-test/invalid/string/text-after-string.toml t/toml-test/invalid/string/wrong-close.t t/toml-test/invalid/string/wrong-close.toml t/toml-test/invalid/table/array-empty.t t/toml-test/invalid/table/array-empty.toml t/toml-test/invalid/table/array-implicit.t t/toml-test/invalid/table/array-implicit.toml t/toml-test/invalid/table/array-missing-bracket.t t/toml-test/invalid/table/array-missing-bracket.toml t/toml-test/invalid/table/duplicate-key-table.t t/toml-test/invalid/table/duplicate-key-table.toml t/toml-test/invalid/table/duplicate-table-array.t t/toml-test/invalid/table/duplicate-table-array.toml t/toml-test/invalid/table/duplicate-table-array2.t t/toml-test/invalid/table/duplicate-table-array2.toml t/toml-test/invalid/table/duplicate.t t/toml-test/invalid/table/duplicate.toml t/toml-test/invalid/table/empty-implicit-table.t t/toml-test/invalid/table/empty-implicit-table.toml t/toml-test/invalid/table/empty.t t/toml-test/invalid/table/empty.toml t/toml-test/invalid/table/equals-sign.t t/toml-test/invalid/table/equals-sign.toml t/toml-test/invalid/table/llbrace.t t/toml-test/invalid/table/llbrace.toml t/toml-test/invalid/table/nested-brackets-close.t t/toml-test/invalid/table/nested-brackets-close.toml t/toml-test/invalid/table/nested-brackets-open.t t/toml-test/invalid/table/nested-brackets-open.toml t/toml-test/invalid/table/quoted-no-close.t t/toml-test/invalid/table/quoted-no-close.toml t/toml-test/invalid/table/redefine.t t/toml-test/invalid/table/redefine.toml t/toml-test/invalid/table/rrbrace.t t/toml-test/invalid/table/rrbrace.toml t/toml-test/invalid/table/text-after-table.t t/toml-test/invalid/table/text-after-table.toml t/toml-test/invalid/table/whitespace.t t/toml-test/invalid/table/whitespace.toml t/toml-test/invalid/table/with-pound.t t/toml-test/invalid/table/with-pound.toml t/toml-test/valid/array/array.t t/toml-test/valid/array/array.toml t/toml-test/valid/array/bool.t t/toml-test/valid/array/bool.toml t/toml-test/valid/array/empty.t t/toml-test/valid/array/empty.toml t/toml-test/valid/array/hetergeneous.t t/toml-test/valid/array/hetergeneous.toml t/toml-test/valid/array/mixed-int-array.t t/toml-test/valid/array/mixed-int-array.toml t/toml-test/valid/array/mixed-int-float.t t/toml-test/valid/array/mixed-int-float.toml t/toml-test/valid/array/mixed-int-string.t t/toml-test/valid/array/mixed-int-string.toml t/toml-test/valid/array/mixed-string-table.t t/toml-test/valid/array/mixed-string-table.toml t/toml-test/valid/array/nested-double.t t/toml-test/valid/array/nested-double.toml t/toml-test/valid/array/nested-inline-table.t t/toml-test/valid/array/nested-inline-table.toml t/toml-test/valid/array/nested.t t/toml-test/valid/array/nested.toml t/toml-test/valid/array/nospaces.t t/toml-test/valid/array/nospaces.toml t/toml-test/valid/array/string-quote-comma-2.t t/toml-test/valid/array/string-quote-comma-2.toml t/toml-test/valid/array/string-quote-comma.t t/toml-test/valid/array/string-quote-comma.toml t/toml-test/valid/array/string-with-comma.t t/toml-test/valid/array/string-with-comma.toml t/toml-test/valid/array/strings.t t/toml-test/valid/array/strings.toml t/toml-test/valid/array/table-array-string-backslash.t t/toml-test/valid/array/table-array-string-backslash.toml t/toml-test/valid/bool/bool.t t/toml-test/valid/bool/bool.toml t/toml-test/valid/comment/at-eof.t t/toml-test/valid/comment/at-eof.toml t/toml-test/valid/comment/at-eof2.t t/toml-test/valid/comment/at-eof2.toml t/toml-test/valid/comment/everywhere.t t/toml-test/valid/comment/everywhere.toml t/toml-test/valid/comment/tricky.t t/toml-test/valid/comment/tricky.toml t/toml-test/valid/datetime/datetime.t t/toml-test/valid/datetime/datetime.toml t/toml-test/valid/datetime/local-date.t t/toml-test/valid/datetime/local-date.toml t/toml-test/valid/datetime/local-time.t t/toml-test/valid/datetime/local-time.toml t/toml-test/valid/datetime/local.t t/toml-test/valid/datetime/local.toml t/toml-test/valid/datetime/milliseconds.t t/toml-test/valid/datetime/milliseconds.toml t/toml-test/valid/datetime/timezone.t t/toml-test/valid/datetime/timezone.toml t/toml-test/valid/empty-file.t t/toml-test/valid/empty-file.toml t/toml-test/valid/example.t t/toml-test/valid/example.toml t/toml-test/valid/float/exponent.t t/toml-test/valid/float/exponent.toml t/toml-test/valid/float/float.t t/toml-test/valid/float/float.toml t/toml-test/valid/float/inf-and-nan.t t/toml-test/valid/float/inf-and-nan.toml t/toml-test/valid/float/long.t t/toml-test/valid/float/long.toml t/toml-test/valid/float/underscore.t t/toml-test/valid/float/underscore.toml t/toml-test/valid/float/zero.t t/toml-test/valid/float/zero.toml t/toml-test/valid/implicit-and-explicit-after.t t/toml-test/valid/implicit-and-explicit-after.toml t/toml-test/valid/implicit-and-explicit-before.t t/toml-test/valid/implicit-and-explicit-before.toml t/toml-test/valid/implicit-groups.t t/toml-test/valid/implicit-groups.toml t/toml-test/valid/inline-table/array.t t/toml-test/valid/inline-table/array.toml t/toml-test/valid/inline-table/bool.t t/toml-test/valid/inline-table/bool.toml t/toml-test/valid/inline-table/empty.t t/toml-test/valid/inline-table/empty.toml t/toml-test/valid/inline-table/end-in-bool.t t/toml-test/valid/inline-table/end-in-bool.toml t/toml-test/valid/inline-table/inline-table.t t/toml-test/valid/inline-table/inline-table.toml t/toml-test/valid/inline-table/key-dotted.t t/toml-test/valid/inline-table/key-dotted.toml t/toml-test/valid/inline-table/multiline.t t/toml-test/valid/inline-table/multiline.toml t/toml-test/valid/inline-table/nest.t t/toml-test/valid/inline-table/nest.toml t/toml-test/valid/integer/integer.t t/toml-test/valid/integer/integer.toml t/toml-test/valid/integer/literals.t t/toml-test/valid/integer/literals.toml t/toml-test/valid/integer/long.t t/toml-test/valid/integer/long.toml t/toml-test/valid/integer/underscore.t t/toml-test/valid/integer/underscore.toml t/toml-test/valid/integer/zero.t t/toml-test/valid/integer/zero.toml t/toml-test/valid/key/alphanum.t t/toml-test/valid/key/alphanum.toml t/toml-test/valid/key/case-sensitive.t t/toml-test/valid/key/case-sensitive.toml t/toml-test/valid/key/dotted.t t/toml-test/valid/key/dotted.toml t/toml-test/valid/key/empty.t t/toml-test/valid/key/empty.toml t/toml-test/valid/key/equals-nospace.t t/toml-test/valid/key/equals-nospace.toml t/toml-test/valid/key/escapes.t t/toml-test/valid/key/escapes.toml t/toml-test/valid/key/numeric-dotted.t t/toml-test/valid/key/numeric-dotted.toml t/toml-test/valid/key/numeric.t t/toml-test/valid/key/numeric.toml t/toml-test/valid/key/quoted-dots.t t/toml-test/valid/key/quoted-dots.toml t/toml-test/valid/key/space.t t/toml-test/valid/key/space.toml t/toml-test/valid/key/special-chars.t t/toml-test/valid/key/special-chars.toml t/toml-test/valid/key/special-word.t t/toml-test/valid/key/special-word.toml t/toml-test/valid/newline-crlf.t t/toml-test/valid/newline-crlf.toml t/toml-test/valid/newline-lf.t t/toml-test/valid/newline-lf.toml t/toml-test/valid/spec-example-1-compact.t t/toml-test/valid/spec-example-1-compact.toml t/toml-test/valid/spec-example-1.t t/toml-test/valid/spec-example-1.toml t/toml-test/valid/string/double-quote-escape.t t/toml-test/valid/string/double-quote-escape.toml t/toml-test/valid/string/empty.t t/toml-test/valid/string/empty.toml t/toml-test/valid/string/escape-tricky.t t/toml-test/valid/string/escape-tricky.toml t/toml-test/valid/string/escaped-escape.t t/toml-test/valid/string/escaped-escape.toml t/toml-test/valid/string/escapes.t t/toml-test/valid/string/escapes.toml t/toml-test/valid/string/multiline-quotes.t t/toml-test/valid/string/multiline-quotes.toml t/toml-test/valid/string/nl.t t/toml-test/valid/string/nl.toml t/toml-test/valid/string/raw-multiline.t t/toml-test/valid/string/raw-multiline.toml t/toml-test/valid/string/raw.t t/toml-test/valid/string/raw.toml t/toml-test/valid/string/simple.t t/toml-test/valid/string/simple.toml t/toml-test/valid/string/unicode-escape.t t/toml-test/valid/string/unicode-escape.toml t/toml-test/valid/string/unicode-literal.t t/toml-test/valid/string/unicode-literal.toml t/toml-test/valid/string/with-pound.t t/toml-test/valid/string/with-pound.toml t/toml-test/valid/table/array-implicit.t t/toml-test/valid/table/array-implicit.toml t/toml-test/valid/table/array-many.t t/toml-test/valid/table/array-many.toml t/toml-test/valid/table/array-nest.t t/toml-test/valid/table/array-nest.toml t/toml-test/valid/table/array-one.t t/toml-test/valid/table/array-one.toml t/toml-test/valid/table/array-table-array.t t/toml-test/valid/table/array-table-array.toml t/toml-test/valid/table/empty.t t/toml-test/valid/table/empty.toml t/toml-test/valid/table/keyword.t t/toml-test/valid/table/keyword.toml t/toml-test/valid/table/names.t t/toml-test/valid/table/names.toml t/toml-test/valid/table/no-eol.t t/toml-test/valid/table/no-eol.toml t/toml-test/valid/table/sub-empty.t t/toml-test/valid/table/sub-empty.toml t/toml-test/valid/table/whitespace.t t/toml-test/valid/table/whitespace.toml t/toml-test/valid/table/with-literal-string.t t/toml-test/valid/table/with-literal-string.toml t/toml-test/valid/table/with-pound.t t/toml-test/valid/table/with-pound.toml t/toml-test/valid/table/with-single-quotes.t t/toml-test/valid/table/with-single-quotes.toml t/toml-test/valid/table/without-super.t t/toml-test/valid/table/without-super.toml t/writer.t tags META.json100644001750001750 400414105470632 15144 0ustar00sysreadsysread000000000000TOML-Tiny-0.15{ "abstract" : "a minimal, pure perl TOML parser and serializer", "author" : [ "Jeff Ober " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "TOML-Tiny", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Test::Pod" : "1.41" } }, "runtime" : { "recommends" : { "Types::Serialiser" : "0" }, "requires" : { "Carp" : "0", "Data::Dumper" : "0", "Encode" : "0", "Exporter" : "0", "Math::BigInt" : "1.999718", "perl" : "5.018" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900", "Unicode::GCString" : "0" }, "requires" : { "Data::Dumper" : "0", "DateTime::Format::ISO8601" : "0", "DateTime::Format::RFC3339" : "0", "ExtUtils::MakeMaker" : "0", "File::Spec" : "0", "TOML::Parser" : "0", "Test2::V0" : "0", "Test::More" : "0", "Test::Pod" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/sysread/TOML-Tiny/issues" }, "homepage" : "https://github.com/sysread/TOML-Tiny", "repository" : { "type" : "git", "url" : "https://github.com/sysread/TOML-Tiny.git", "web" : "https://github.com/sysread/TOML-Tiny" } }, "version" : "0.15", "x_generated_by_perl" : "v5.32.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.24", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } Dockerfile100644001750001750 30414105470632 15474 0ustar00sysreadsysread000000000000TOML-Tiny-0.15FROM perl:latest RUN mkdir /toml-tiny WORKDIR /toml-tiny COPY ./ ./ RUN cpanm -nq Dist::Zilla RUN dzil authordeps --missing | cpanm -nq RUN dzil listdeps --missing | cpanm -nq RUN dzil test -j8 t000755001750001750 014105470632 13630 5ustar00sysreadsysread000000000000TOML-Tiny-0.15writer.t100644001750001750 604614105470632 15477 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/tuse strict; use warnings; use Test2::V0; use TOML::Tiny; use DateTime::Format::RFC3339; use DateTime::Format::ISO8601; my $src = do{ local $/; }; subtest basics => sub{ my $data = from_toml($src); my $toml = to_toml($data); my $got = from_toml($toml); is $got, $data, 'to_toml <=> from_toml'; }; #------------------------------------------------------------------------------- # Adapted from DateTime::Format::RFC3339. #------------------------------------------------------------------------------- subtest 'rfc3339 datetimes' => sub{ my $dt; $dt = DateTime->new(year => 2002, month => 7, day => 1, hour => 13, minute => 50, second => 5, time_zone => 'UTC'); is TOML::Tiny::Writer::strftime_rfc3339($dt), '2002-07-01T13:50:05Z', 'UTC'; $dt = DateTime->new(year => 2002, month => 7, day => 1, hour => 13, minute => 50, second => 5, time_zone => 'Europe/London'); is TOML::Tiny::Writer::strftime_rfc3339($dt), '2002-07-01T13:50:05+01:00', 'positive offset'; $dt = DateTime->new(year => 2002, month => 1, day => 1, hour => 13, minute => 50, second => 5, time_zone => 'Europe/London'); is TOML::Tiny::Writer::strftime_rfc3339($dt), '2002-01-01T13:50:05+00:00', 'zero offset'; $dt = DateTime->new(year => 2002, month => 1, day => 1, hour => 13, minute => 50, second => 5, time_zone => 'America/New_York'); is TOML::Tiny::Writer::strftime_rfc3339($dt), '2002-01-01T13:50:05-05:00', 'negative offset'; $dt = DateTime->new(year => 1880, month => 1, day => 1, hour => 0, minute => 0, second => 0, time_zone => 'America/New_York'); is TOML::Tiny::Writer::strftime_rfc3339($dt), '1880-01-01T04:56:02Z', 'offset with non-integral minutes'; $dt = DateTime->new(year => 2002, month => 1, day => 1, hour => 13, minute => 50, second => 5, time_zone => 'floating'); is TOML::Tiny::Writer::strftime_rfc3339($dt), '2002-01-01T13:50:05', 'floating time zone'; }; subtest 'oddballs and regressions' => sub{ subtest 'strings that look like numbers' => sub{ my $data = { is_inf => 'inf', not_inf => 'to infinity and beyond', is_nan => 'nan', not_nan => 'no nan here', }; is to_toml({a => 'no inf here'}), 'a="no inf here"', '"inf" present in string is string'; is to_toml({a => 'no nan here'}), 'a="no nan here"', '"nan" present in string is string'; }; }; done_testing; __DATA__ # This is a TOML document. title = "TOML Example" hetero_array = ["life", "universe", "everything", 42] [owner] name = "Tom Preston-Werner" dob = 1979-05-27T07:32:00-08:00 # First class dates [database] server = "192.168.1.1" ports = [ 8001, 8001, 8002 ] connection_max = 5000 enabled = true options = {"quote-keys"=false} [servers] # Indentation (tabs and/or spaces) is allowed but not required [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10" [clients] data = [ ["gamma", "delta"], [1, 2] ] # Line breaks are OK when inside arrays hosts = [ "alpha", "omega" ] [[products]] name = "Hammer" sku = 738594937 [[products]] [[products]] name = "Nail" sku = 284758393 color = "gray" parity.t100644001750001750 430614105470632 15470 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t#------------------------------------------------------------------------------- # Tests the results of parsing the example TOML from # https://github.com/toml-lang/toml against the de facto standard TOML module # on CPAN. Includes the array-of-tables example as well since that is not # represented in the synopsis example #------------------------------------------------------------------------------- use Test2::V0; use Data::Dumper; use TOML::Tiny::Parser; my $toml = do{ local $/; }; subtest 'TOML::Parser' => sub{ use TOML::Parser; subtest 'defaults' => sub{ my $exp = TOML::Parser->new->parse($toml); my $got = TOML::Tiny::Parser->new->parse($toml); is $got, $exp, 'equivalence' or diag Dumper({got => $got, expected => $exp}); }; subtest 'inflate_boolean' => sub{ my $inflate = sub{ shift eq 'true' ? 'yes' : 'no' }; my $exp = TOML::Parser->new(inflate_boolean => $inflate)->parse($toml); my $got = TOML::Tiny::Parser->new(inflate_boolean => $inflate)->parse($toml); is $got, $exp, 'equivalence' or diag Dumper({got => $got, expected => $exp}); }; subtest 'inflate_datetime' => sub{ require DateTime::Format::RFC3339; my $inflate = sub{ DateTime::Format::RFC3339->parse_datetime(shift) }; my $exp = TOML::Parser->new(inflate_datetime => $inflate)->parse($toml); my $got = TOML::Tiny::Parser->new(inflate_datetime => $inflate)->parse($toml); is $got, $exp, 'equivalence' or diag Dumper({got => $got, expected => $exp}); }; }; done_testing; __DATA__ # This is a TOML document. title = "TOML Example" [owner] name = "Tom Preston-Werner" dob = 1979-05-27T07:32:00-08:00 # First class dates [database] server = "192.168.1.1" ports = [ 8001, 8001, 8002 ] connection_max = 5000 enabled = true options = {"quote-keys"=false} [servers] # Indentation (tabs and/or spaces) is allowed but not required [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10" [clients] data = [ ["gamma", "delta"], [1, 2] ] # Line breaks are OK when inside arrays hosts = [ "alpha", "omega" ] [[products]] name = "Hammer" sku = 738594937 [[products]] [[products]] name = "Nail" sku = 284758393 color = "gray" parser.t100644001750001750 161614105470632 15455 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/tuse strict; use warnings; use Test2::V0; use TOML::Tiny; subtest 'oddballs and regressions' => sub{ subtest 'strings that look like numbers' => sub{ my $parser = TOML::Tiny->new( inflate_integer => sub{ use Math::BigInt; Math::BigInt->new(shift); }, inflate_float => sub{ use Math::BigFloat; Math::BigFloat->new(shift); } ); my $data = $parser->decode(q{ not_an_int = "42" is_an_int = 42 not_a_flt = "4.2" is_a_flt = 4.2 }); ok !ref($data->{not_an_int}), 'strings do not inflate as integers'; ok ref($data->{is_an_int}) && $data->{is_an_int}->isa('Math::BigInt'), 'integers do inflate with inflate_integer'; ok !ref($data->{not_a_flt}), 'strings do not inflate as floats'; ok ref($data->{is_a_flt}) && $data->{is_a_flt}->isa('Math::BigFloat'), 'floats do inflate with inflate_float'; }; }; done_testing; numbers.t100644001750001750 1011714105470632 15650 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/tuse strict; use warnings; use Test2::V0; use TOML::Tiny; require Math::BigInt; require Math::BigFloat; subtest 'integers' => sub{ subtest 'decimal' => sub{ is from_toml('x=42'), {x => 42}, 'positive'; is from_toml('x=-42'), {x => -42}, 'negative'; is from_toml('x=42_42'), {x => 4242}, 'underscores'; is from_toml('x=9223372036854775807'), hash{ field x => validator(sub{ my %params = @_; Math::BigInt->new('9223372036854775807')->beq($params{got}); }); end; }, 'positive bignum'; is from_toml('x=-9223372036854775808'), hash{ field x => validator(sub{ my %params = @_; Math::BigInt->new('-9223372036854775808')->beq($params{got}); }); end; }, 'negative bignum'; }; subtest 'hexadecimal' => sub{ is from_toml('x=0xDEADBEEF'), {x => 0xDEADBEEF}, 'all caps'; is from_toml('x=0xdeadbeef'), {x => 0xDEADBEEF}, 'all lower'; is from_toml('x=0xDeAdBeEf'), {x => 0xDEADBEEF}, 'mixed caps'; is from_toml('x=0xDEAD_BEEF'), {x => 0xDEADBEEF}, 'underscores'; is from_toml('x=0xDEADBEEF '), {x => 0xDEADBEEF}, 'trailing space'; is from_toml('x=0x7fffffffffffffff'), hash{ field x => validator(sub{ my %params = @_; Math::BigInt->new('0x7fffffffffffffff')->beq($params{got}); }); end; }, 'bignum'; }; subtest 'binary' => sub{ is from_toml('x=0b1010'), {x => 0b1010}, 'binary'; is from_toml('x=0b10_10'), {x => 0b1010}, 'underscores'; is from_toml('x=0o777777777777777777777'), hash{ field x => validator(sub{ my %params = @_; Math::BigInt->from_oct('0777777777777777777777')->beq($params{got}); }); end; }, 'bignum'; }; subtest 'octal' => sub{ is from_toml('x=0o755'), {x => 0755}, 'octal'; is from_toml('x=0o7_55'), {x => 0755}, 'underscores'; is from_toml('x=0b111111111111111111111111111111111111111111111111111111111111111'), hash{ field x => validator(sub{ my %params = @_; Math::BigInt->new('0b111111111111111111111111111111111111111111111111111111111111111')->beq($params{got}); }); end; }, 'bignum'; }; }; subtest 'floats' => sub{ is from_toml('x=4.2'), {x => 4.2}, '4.2'; is from_toml('x=+4.2'), {x => 4.2}, '+4.2'; is from_toml('x=-4.2'), {x => -4.2}, '-4.2'; is from_toml('x=0.42'), {x => 0.42}, '0.42'; is from_toml('x=+0.42'), {x => 0.42}, '+0.42'; is from_toml('x=-0.42'), {x => -0.42}, '-0.42'; subtest 'exponent w/ lowercase e' => sub{ is from_toml('x=4.2e3'), {x => 4.2e3}, '4.2e3'; is from_toml('x=-4.2e3'), {x => -4.2e3}, '-4.2e3'; is from_toml('x=4.2e-3'), {x => 4.2e-3}, '4.2e-3'; is from_toml('x=-4.2e-3'), {x => -4.2e-3}, '-4.2e-3'; }; subtest 'exponent w/ uppercase e' => sub{ is from_toml('x=4.2E3'), {x => 4.2e3}, '4.2E3'; is from_toml('x=-4.2E3'), {x => -4.2e3}, '-4.2E3'; is from_toml('x=4.2E-3'), {x => 4.2e-3}, '4.2E-3'; is from_toml('x=-4.2E-3'), {x => -4.2e-3}, '-4.2E-3'; }; is from_toml('x=inf'), {x => 'inf'}, 'inf'; is from_toml('x=+inf'), {x => 'inf'}, '+inf'; is from_toml('x=-inf'), {x => -'inf'}, '-inf'; for (qw(nan +nan -nan)) { is from_toml("x=$_"), hash{ field x => 'NaN'; end; }, $_; } is from_toml('x=nan'), {x => 'NaN'}, 'nan'; is from_toml('x=+nan'), {x => 'NaN'}, '+nan'; is from_toml('x=-nan'), {x => 'NaN'}, '-nan'; is from_toml('x=42_42.42_42'), {x => 4242.4242}, 'underscores'; }; #------------------------------------------------------------------------------- # Ensure that numbers survive the trip through to_toml(from_toml(...)) and are # not coerced into strings by perl. #------------------------------------------------------------------------------- subtest 'round trip preserves numerical values' => sub{ is to_toml(scalar from_toml('port=1234')), 'port=1234', 'integers'; is to_toml(scalar from_toml('pi=3.14')), 'pi=3.14', 'floats'; is to_toml(scalar from_toml('nan=nan')), 'nan=nan', 'nan'; is to_toml(scalar from_toml('pos=inf')), 'pos=inf', 'inf'; is to_toml(scalar from_toml('neg=-inf')), 'neg=-inf', '-inf'; }; done_testing; Makefile.PL100644001750001750 436114105470632 15503 0ustar00sysreadsysread000000000000TOML-Tiny-0.15# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.017. use strict; use warnings; use 5.018; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "a minimal, pure perl TOML parser and serializer", "AUTHOR" => "Jeff Ober ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "TOML-Tiny", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.018", "NAME" => "TOML::Tiny", "PREREQ_PM" => { "Carp" => 0, "Data::Dumper" => 0, "Encode" => 0, "Exporter" => 0, "Math::BigInt" => "1.999718" }, "TEST_REQUIRES" => { "Data::Dumper" => 0, "DateTime::Format::ISO8601" => 0, "DateTime::Format::RFC3339" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "TOML::Parser" => 0, "Test2::V0" => 0, "Test::More" => 0, "Test::Pod" => 0 }, "VERSION" => "0.15", "test" => { "TESTS" => "t/*.t t/toml-test/invalid/array/*.t t/toml-test/invalid/bool/*.t t/toml-test/invalid/control/*.t t/toml-test/invalid/datetime/*.t t/toml-test/invalid/encoding/*.t t/toml-test/invalid/float/*.t t/toml-test/invalid/inline-table/*.t t/toml-test/invalid/integer/*.t t/toml-test/invalid/key/*.t t/toml-test/invalid/string/*.t t/toml-test/invalid/table/*.t t/toml-test/valid/*.t t/toml-test/valid/array/*.t t/toml-test/valid/bool/*.t t/toml-test/valid/comment/*.t t/toml-test/valid/datetime/*.t t/toml-test/valid/float/*.t t/toml-test/valid/inline-table/*.t t/toml-test/valid/integer/*.t t/toml-test/valid/key/*.t t/toml-test/valid/string/*.t t/toml-test/valid/table/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Data::Dumper" => 0, "DateTime::Format::ISO8601" => 0, "DateTime::Format::RFC3339" => 0, "Encode" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "Math::BigInt" => "1.999718", "TOML::Parser" => 0, "Test2::V0" => 0, "Test::More" => 0, "Test::Pod" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); MANIFEST.SKIP100644001750001750 3214105470632 15356 0ustar00sysreadsysread000000000000TOML-Tiny-0.15scratch.pl build-tests.pl TOML000755001750001750 014105470632 14706 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/libTiny.pm100644001750001750 2504014105470632 16350 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOMLpackage TOML::Tiny; # ABSTRACT: a minimal, pure perl TOML parser and serializer $TOML::Tiny::VERSION = '0.15'; use strict; use warnings; no warnings qw(experimental); use v5.18; use TOML::Tiny::Parser; use TOML::Tiny::Writer; use parent 'Exporter'; our @EXPORT = qw( from_toml to_toml ); #------------------------------------------------------------------------------- # TOML module compatibility #------------------------------------------------------------------------------- sub from_toml { my ($source, %param) = @_; # strict was previously strict_arrays; accept both for backward # compatibility. if (exists $param{strict_arrays}) { $param{strict} = $param{strict_arrays}; delete $param{strict_arrays}; } my $parser = TOML::Tiny::Parser->new(%param); my $toml = eval{ $parser->parse($source) }; if (wantarray) { return ($toml, $@); } else { die $@ if $@; return $toml; } } sub to_toml { my ($data, %param) = @_; # strict was previously strict_arrays; accept both for backward # compatibility. if (exists $param{strict_arrays}) { $param{strict} = $param{strict_arrays}; delete $param{strict_arrays}; } TOML::Tiny::Writer::to_toml($data, %param); } #------------------------------------------------------------------------------- # Object API #------------------------------------------------------------------------------- sub new { my ($class, %param) = @_; bless{ %param, parser => TOML::Tiny::Parser->new(%param) }, $class; } sub decode { my ($self, $source) = @_; $self->{parser}->parse($source); } sub encode { my ($self, $data) = @_; TOML::Tiny::Writer::to_toml($data, strict => $self->{strict}); } #------------------------------------------------------------------------------- # For compatibility with TOML::from_toml's use of $TOML::Parser #------------------------------------------------------------------------------- sub parse { goto \&decode; } 1; __END__ =pod =encoding UTF-8 =head1 NAME TOML::Tiny - a minimal, pure perl TOML parser and serializer =head1 VERSION version 0.15 =head1 SYNOPSIS use TOML::Tiny qw(from_toml to_toml); binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; # Decoding TOML my $toml = do{ local $/; }; my ($parsed, $error) = from_toml $toml; # Encoding TOML say to_toml({ stuff => { about => ['other', 'stuff'], }, }); # Object API my $parser = TOML::Tiny->new; my $data = $parser->decode($toml); say $parser->encode($data); =head1 DESCRIPTION =for html

Build status

C implements a pure-perl parser and generator for the L data format. It conforms to TOML v1.0 (with a few caveats; see L). C strives to maintain an interface compatible to the L and L modules, and could even be used to override C<$TOML::Parser>: use TOML; use TOML::Tiny; local $TOML::Parser = TOML::Tiny->new(...); say to_toml(...); =head1 EXPORTS C exports the following to functions for compatibility with the L module. See L. =head2 from_toml Parses a string of C-formatted source and returns the resulting data structure. Any arguments after the first are passed to L's constructor. If there is a syntax error in the C source, C will die with an explanation which includes the line number of the error. my $result = eval{ from_toml($toml_string) }; Alternately, this routine may be called in list context, in which case syntax errors will result in returning two values, C and an error message. my ($result, $error) = from_toml($toml_string); Additional arguments may be passed after the toml source string; see L. =head3 GOTCHAS =over =item Big integers and floats C supports integers and floats larger than what many perls support. When C encounters a value it may not be able to represent as a number, it will instead return a L or L. This behavior can be overridden by providing inflation routines: my $toml = TOML::Tiny->new( inflate_float => sub{ return do_something_else_with_floats( $_[0] ); }; ); =back =head2 to_toml Encodes a hash ref as a C-formatted string. my $toml = to_toml({foo => {'bar' => 'bat'}}); # [foo] # bar="bat" =head3 mapping perl to TOML types =head4 table =over =item C ref =back =head4 array =over =item C ref =back =head4 boolean =over =item C<\0> or C<\1> =item L =item L =back =head4 numeric types These are tricky in perl. When encountering a C, that representation is used. If the value is a defined (non-ref) scalar with the C or C flags set, the value will be emitted unchanged. This is in line with most other packages, so the normal hinting hacks for typed output apply: number => 0 + $number, string => "" . $string, =over =item L =item L =item numerical scalars =back =head4 datetime =over =item RFC3339-formatted string e.g., C<"1985-04-12T23:20:50.52Z"> =item L Ls are formatted as C, as expected by C. However, C supports the concept of a "local" time zone, which strays from C by allowing a datetime without a time zone offset. This is represented in perl by a C with a B. =back =head4 string All other non-ref scalars are treated as strings. =head1 OBJECT API =head2 new =over =item inflate_datetime By default, C treats TOML datetimes as strings in the generated data structure. The C parameter allows the caller to provide a routine to intercept those as they are generated: use DateTime::Format::RFC3339; my $parser = TOML::Tiny->new( inflate_datetime => sub{ my ($dt_string) = @_; # DateTime::Format::RFC3339 will set the resulting DateTime's formatter # to itself. Fallback is the DateTime default, ISO8601, with a possibly # floating time zone. return eval{ DateTime::Format::RFC3339->parse_datetime($dt_string) } || DateTime::Format::ISO8601->parse_datetime($dt_string); }, ); =item inflate_boolean By default, boolean values in a C document result in a C<1> or C<0>. If L is installed, they will instead be C or C. If you wish to override this, you can provide your own routine to generate values: my $parser = TOML::Tiny->new( inflate_boolean => sub{ my $bool = shift; if ($bool eq 'true') { return 'The Truth'; } else { return 'A Lie'; } }, ); =item inflate_integer TOML integers are 64 bit and may not match the size of the compiled perl's internal integer type. By default, C coerces numbers that fit within a perl number by adding C<0>. For bignums, a L is returned. This may be overridden by providing an inflation routine: my $parser = TOML::Tiny->new( inflate_integer => sub{ my $parsed = shift; return sprintf 'the number "%d"', $parsed; }; ); =item inflate_float TOML floats are 64 bit and may not match the size of the compiled perl's internal float type. As with integers, floats are coerced to numbers and large floats are upgraded to Ls. The special strings C and C may also be returned. You can override this by specifying an inflation routine. my $parser = TOML::Tiny->new( inflate_float => sub{ my $parsed = shift; return sprintf '"%0.8f" is a float', $parsed; }; ); =item strict C imposes some miscellaneous strictures on C input, such as disallowing trailing commas in inline tables and failing on invalid UTF8 input. B C was previously called C. Both are accepted for backward compatibility, although enforcement of homogenous arrays is no longer supported as it has been dropped from the spec. =back =head2 decode Decodes C and returns a hash ref. Dies on parse error. =head2 encode Encodes a perl hash ref as a C-formatted string. =head2 parse Alias for C to provide compatibility with C when overriding the parser by setting C<$TOML::Parser>. =head1 DIFFERENCES FROM L AND L C differs in a few significant ways from the L module, particularly in adding support for newer C features and strictness. L defaults to lax parsing and provides C to (slightly) tighten things up. C defaults to (somehwat) stricter parsing, enabling some extra strictures with L. C supports a number of options which do not exist in L: L, L, and L. C ignores invalid surrogate pairs within basic and multiline strings (L may attempt to decode an invalid pair). Additionally, only those character escapes officially supported by TOML are interpreted as such by C. C supports stripping initial whitespace and handles lines terminating with a backslash correctly in multilne strings: # TOML input x=""" foo""" y="""\ how now \ brown \ bureaucrat.\ """ # Perl output {x => 'foo', y => 'how now brown bureaucrat.'} C includes support for integers specified in binary, octal or hex as well as the special float values C and C. =head1 SEE ALSO =over =item L Regexp scraps used by C to parse TOML source. =back =head1 ACKNOWLEDGEMENTS Thanks to L for encouraging their employees to contribute back to the open source ecosystem. Without their dedication to quality software development this distribution would not exist. A big thank you to those who have contributed code or bug reports: =over =item L =item L =item L =item L =back =head1 AUTHOR Jeff Ober =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut strict_arrays.t100644001750001750 44414105470632 17030 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/tuse strict; use warnings; use Test2::V0; use TOML::Tiny; my $tt = TOML::Tiny->new(strict_arrays => 1); subtest 'string containing int recognized as type=integer' => sub{ my $toml = q{ [test] array = ["u", "u2"] }; ok lives{ $tt->decode($toml) }, 'parse succeeds'; }; done_testing; Tiny000755001750001750 014105470632 15631 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOMLUtil.pm100644001750001750 300314105470632 17240 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOML/Tinypackage TOML::Tiny::Util; # ABSTRACT: utility functions used by TOML::Tiny $TOML::Tiny::Util::VERSION = '0.15'; use strict; use warnings; no warnings 'experimental'; use v5.18; use TOML::Tiny::Grammar; use parent 'Exporter'; our @EXPORT_OK = qw( is_strict_array ); sub is_strict_array { my $arr = shift; my @types = map{ my $value = $_; my $type; for (ref $value) { $type = 'array' when 'ARRAY'; $type = 'table' when 'HASH'; # Do a little heuristic guess-work $type = 'float' when /Float/; $type = 'integer' when /Int/; $type = 'bool' when /Boolean/; when ('') { for ($value) { $type = 'bool' when /^$Boolean/; $type = 'float' when /^$Float/; $type = 'integer' when /^$Integer/; $type = 'datetime' when /^$DateTime/; default{ $type = 'string' }; } } default{ $type = $_; } } $type; } @$arr; my $t = shift @types; for (@types) { return (undef, "expected value of type $t, but found $_") if $_ ne $t; } return (1, undef); } 1; __END__ =pod =encoding UTF-8 =head1 NAME TOML::Tiny::Util - utility functions used by TOML::Tiny =head1 VERSION version 0.15 =head1 AUTHOR Jeff Ober =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut author-pod-syntax.t100644001750001750 45414105470632 17546 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); 00-report-prereqs.t100644001750001750 1345214105470632 17411 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.028 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if $mod eq 'perl'; next if grep { $_ eq $mod } @exclude; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: 00-report-prereqs.dd100644001750001750 353514105470632 17516 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/tdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Test::Pod' => '1.41' } }, 'runtime' => { 'recommends' => { 'Types::Serialiser' => '0' }, 'requires' => { 'Carp' => '0', 'Data::Dumper' => '0', 'Encode' => '0', 'Exporter' => '0', 'Math::BigInt' => '1.999718', 'perl' => '5.018' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900', 'Unicode::GCString' => '0' }, 'requires' => { 'Data::Dumper' => '0', 'DateTime::Format::ISO8601' => '0', 'DateTime::Format::RFC3339' => '0', 'ExtUtils::MakeMaker' => '0', 'File::Spec' => '0', 'TOML::Parser' => '0', 'Test2::V0' => '0', 'Test::More' => '0', 'Test::Pod' => '0' } } }; $x; }Parser.pm100644001750001750 3131114105470632 17602 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOML/Tinypackage TOML::Tiny::Parser; # ABSTRACT: parser used by TOML::Tiny $TOML::Tiny::Parser::VERSION = '0.15'; use utf8; use strict; use warnings; no warnings qw(experimental); use v5.18; use Carp; use Data::Dumper; use Encode qw(decode FB_CROAK); use TOML::Tiny::Util qw(is_strict_array); use TOML::Tiny::Grammar; require Math::BigFloat; require Math::BigInt; require TOML::Tiny::Tokenizer; our $TRUE = 1; our $FALSE = 0; eval{ require Types::Serialiser; $TRUE = Types::Serialiser::true(); $FALSE = Types::Serialiser::false(); }; sub new { my ($class, %param) = @_; bless{ inflate_integer => $param{inflate_integer}, inflate_float => $param{inflate_float}, inflate_datetime => $param{inflate_datetime} || sub{ shift }, inflate_boolean => $param{inflate_boolean} || sub{ shift eq 'true' ? $TRUE : $FALSE }, strict => $param{strict}, }, $class; } sub next_token { my $self = shift; my $token = $self->{tokenizer} && $self->{tokenizer}->next_token; return $token; } sub parse { my ($self, $toml) = @_; if ($self->{strict}) { $toml = decode('UTF-8', "$toml", FB_CROAK); } $self->{tokenizer} = TOML::Tiny::Tokenizer->new(source => $toml); $self->{keys} = []; $self->{root} = {}; $self->{tables} = {}; # "seen" hash of explicitly defined table names (e.g. [foo]) $self->{arrays} = {}; # "seen" hash of explicitly defined static arrays (e.g. foo=[]) $self->{array_tables} = {}; # "seen" hash of explicitly defined arrays of tables (e.g. [[foo]]) $self->parse_table; my $result = $self->{root}; delete $self->{tokenizer}; delete $self->{keys}; delete $self->{root}; delete $self->{tables}; delete $self->{arrays}; delete $self->{array_tables}; return $result; } sub parse_error { my ($self, $token, $msg) = @_; my $line = $token ? $token->{line} : 'EOF'; if ($ENV{TOML_TINY_DEBUG}) { my $root = Dumper($self->{root}); my $tok = Dumper($token); my $src = substr $self->{tokenizer}{source}, $self->{tokenizer}{position}, 30; confess qq{ toml parse error at line $line: $msg Current token: $tok Parse state: $root Source near location of error: ... $src ... }; } else { die "toml parse error at line $line: $msg\n"; } } sub expect_type { my ($self, $token, $expected) = @_; my $actual = $token ? $token->{type} : 'EOF'; $self->parse_error($token, "expected $expected, but found $actual") unless $actual =~ /$expected/; } sub current_key { my $self = shift; my @keys = $self->get_keys; my $key = join '.', map{ qq{"$_"} } @keys; return $key; } sub push_keys { my ($self, $token) = @_; push @{ $self->{keys} }, $token->{value}; } sub pop_keys { my $self = shift; pop @{ $self->{keys} }; } sub get_keys { my $self = shift; return map{ @$_ } @{ $self->{keys} }; } sub set_key { my ($self, $token) = @_; my @keys = $self->get_keys; my $key = pop @keys; my $node = $self->scan_to_key(\@keys); if ($key && exists $node->{$key}) { $self->parse_error($token, 'duplicate key: ' . $self->current_key); } $node->{$key} = $self->parse_value($token); } sub declare_key { my ($self, $token) = @_; my $key = $self->current_key || return; for ($token->{type}) { when ('inline_array') { $self->parse_error($token, "duplicate key: $key") if exists $self->{array_tables}{$key}; $self->{arrays}{$key} = 1; } when ('array_table') { if (exists $self->{arrays}{$key}) { $self->parse_error($token, "duplicate key: $key"); } $self->{array_tables}{$key} = 1; } when ('table') { $self->parse_error($token, "duplicate key: $key") if exists $self->{arrays}{$key} || exists $self->{array_tables}{$key}; if (exists $self->{tables}{$key}) { # Tables cannot be redefined, *except* when doing so within a goddamn # table array. Gawd I hate TOML. my $in_a_stupid_table_array = 0; my $node = $self->{root}; for my $key ($self->get_keys) { if (exists $node->{$key} && ref($node->{$key}) eq 'ARRAY') { $in_a_stupid_table_array = 1; last; } else { $node = $node->{$key}; } } unless ($in_a_stupid_table_array) { $self->parse_error($token, "duplicate key: $key"); } } else { $self->{tables}{$key} = 1; } } } } sub scan_to_key { my $self = shift; my $keys = shift // [ $self->get_keys ]; my $node = $self->{root}; for my $key (@$keys) { if (exists $node->{$key}) { for (ref $node->{$key}) { $node = $node->{$key} when 'HASH'; $node = $node->{$key}[-1] when 'ARRAY'; default{ my $full_key = join '.', @$keys; die "$full_key is already defined\n"; } } } else { $node = $node->{$key} = {}; } } return $node; } sub parse_table { my $self = shift; my $token = shift // $self->next_token // return; # may be undef on first token in empty document $self->expect_type($token, 'table'); $self->push_keys($token); $self->scan_to_key; $self->declare_key($token); TOKEN: while (my $token = $self->next_token) { for ($token->{type}) { next TOKEN when 'EOL'; when ('key') { $self->expect_type($self->next_token, 'assign'); $self->push_keys($token); $self->set_key($self->next_token); $self->pop_keys; if (my $eol = $self->next_token) { $self->expect_type($eol, 'EOL'); } else { return; } } when ('array_table') { $self->pop_keys; @_ = ($self, $token); goto \&parse_array_table; } when ('table') { $self->pop_keys; @_ = ($self, $token); goto \&parse_table; } default{ $self->parse_error($token, "expected key-value pair, table, or array of tables but got $_"); } } } } sub parse_array_table { my $self = shift; my $token = shift // $self->next_token; $self->expect_type($token, 'array_table'); $self->push_keys($token); $self->declare_key($token); my @keys = $self->get_keys; my $key = pop @keys; my $node = $self->scan_to_key(\@keys); $node->{$key} //= []; push @{ $node->{$key} }, {}; TOKEN: while (my $token = $self->next_token) { for ($token->{type}) { next TOKEN when 'EOL'; when ('key') { $self->expect_type($self->next_token, 'assign'); $self->push_keys($token); $self->set_key($self->next_token); $self->pop_keys; } when ('array_table') { $self->pop_keys; @_ = ($self, $token); goto \&parse_array_table; } when ('table') { $self->pop_keys; @_ = ($self, $token); goto \&parse_table; } default{ $self->parse_error($token, "expected key-value pair, table, or array of tables but got $_"); } } } } sub parse_key { my $self = shift; my $token = shift // $self->next_token; $self->expect_type($token, 'key'); return $token->{value}; } sub parse_value { my $self = shift; my $token = shift; for ($token->{type}) { return $token->{value} when 'string'; return $self->inflate_float($token) when 'float'; return $self->inflate_integer($token) when 'integer'; return $self->{inflate_boolean}->($token->{value}) when 'bool'; return $self->parse_datetime($token) when 'datetime'; return $self->parse_inline_table($token) when 'inline_table'; return $self->parse_array($token) when 'inline_array'; default{ $self->parse_error($token, "value expected (bool, number, string, datetime, inline array, inline table), but found $_"); } } } #------------------------------------------------------------------------------- # TOML permits a space instead of a T, which RFC3339 does not allow. TOML (at # least, according to BurntSushi/toml-tests) allows z instead of Z, which # RFC3339 also does not permit. We will be flexible and allow them both, but # fix them up. TOML also specifies millisecond precision. If fractional seconds # are specified. Whatever. #------------------------------------------------------------------------------- sub parse_datetime { my $self = shift; my $token = shift; my $value = $token->{value}; # Normalize $value =~ tr/z/Z/; $value =~ tr/ /T/; $value =~ s/t/T/; $value =~ s/(\.\d+)($TimeOffset)$/sprintf(".%06d%s", $1 * 1000000, $2)/e; return $self->{inflate_datetime}->($value); } sub parse_array { my $self = shift; my $token = shift; $self->declare_key($token); my @array; my $expect = 'EOL|inline_array_close|string|float|integer|bool|datetime|inline_table|inline_array'; TOKEN: while (1) { my $token = $self->next_token; $self->expect_type($token, $expect); for ($token->{type}) { when ('comma') { $expect = 'EOL|inline_array_close|string|float|integer|bool|datetime|inline_table|inline_array'; next TOKEN; } next TOKEN when 'EOL'; last TOKEN when 'inline_array_close'; default{ push @array, $self->parse_value($token); $expect = 'comma|EOL|inline_array_close'; } } } return \@array; } sub parse_inline_table { my $self = shift; my $token = shift; my $table = {}; my $expect = 'EOL|inline_table_close|key'; TOKEN: while (1) { my $token = $self->next_token; $self->expect_type($token, $expect); for ($token->{type}) { when ('comma') { $expect = $self->{strict} ? 'EOL|key' : 'EOL|key|inline_table_close'; next TOKEN; } when ('key') { $self->expect_type($self->next_token, 'assign'); my $node = $table; my @keys = @{ $token->{value} }; my $key = pop @keys; for (@keys) { $node->{$_} ||= {}; $node = $node->{$_}; } if (exists $node->{$key}) { $self->parse_error($token, 'duplicate key: ' . join('.', map{ qq{"$_"} } @{ $token->{value} })); } else { $node->{ $key } = $self->parse_value($self->next_token); } $expect = 'comma|inline_table_close'; next TOKEN; } last TOKEN when 'inline_table_close'; default{ $self->parse_error($token, "inline table expected key-value pair, but found $_"); } } } return $table; } sub inflate_float { my $self = shift; my $token = shift; my $value = $token->{value}; # Caller-defined inflation routine if ($self->{inflate_float}) { return $self->{inflate_float}->($value); } return 'NaN' if $value =~ /^[-+]?nan$/i; return 'inf' if $value =~ /^\+?inf$/i; return '-inf' if $value =~ /^-inf$/i; # Not a bignum if (0 + $value eq $value) { return 0 + $value; } #----------------------------------------------------------------------------- # Scientific notation is a hairier situation. In order to determine whether a # value will fit inside a perl svnv, we can't just coerce the value to a # number and then test it against the string, because, for example, this will # always be false: # # 9 eq "3e2" # # Instead, we are forced to test the coerced value against a BigFloat, which # is capable of holding the number. #----------------------------------------------------------------------------- if ($value =~ /[eE]/) { if (Math::BigFloat->new($value)->beq(0 + $value)) { return 0 + $value; } } return Math::BigFloat->new($value); } sub inflate_integer { my $self = shift; my $token = shift; my $value = $token->{value}; # Caller-defined inflation routine if ($self->{inflate_integer}) { return $self->{inflate_integer}->($value); } # Hex if ($value =~ /^0x/) { no warnings 'portable'; my $hex = hex $value; my $big = Math::BigInt->new($value); return $big->beq($hex) ? $hex : $big; } # Octal if ($value =~ /^0o/) { no warnings 'portable'; $value =~ s/^0o/0/; my $oct = oct $value; my $big = Math::BigInt->from_oct($value); return $big->beq($oct) ? $oct : $big; } # Binary if ($value =~ /^0b/) { no warnings 'portable'; my $bin = oct $value; # oct handles 0b as binary my $big = Math::BigInt->new($value); return $big->beq($bin) ? $bin : $big; } # Not a bignum if (0 + $value eq $value) { return 0 + $value; } return Math::BigInt->new($value); } 1; __END__ =pod =encoding UTF-8 =head1 NAME TOML::Tiny::Parser - parser used by TOML::Tiny =head1 VERSION version 0.15 =head1 AUTHOR Jeff Ober =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Writer.pm100644001750001750 1557614105470632 17641 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOML/Tinypackage TOML::Tiny::Writer; $TOML::Tiny::Writer::VERSION = '0.15'; use strict; use warnings; no warnings qw(experimental); use v5.18; use B qw(svref_2object SVf_IOK SVf_NOK); use Data::Dumper; use TOML::Tiny::Grammar; use TOML::Tiny::Util qw(is_strict_array); my @KEYS; sub to_toml { my $data = shift; my $param = ref($_[1]) eq 'HASH' ? $_[1] : undef; for (ref $data) { when ('HASH') { return to_toml_table($data, $param); } when ('ARRAY') { return to_toml_array($data, $param); } when ('SCALAR') { if ($$data eq '1') { return 'true'; } elsif ($$data eq '0') { return 'false'; } else { return to_toml($$_, $param); } } when ('JSON::PP::Boolean') { return $$data ? 'true' : 'false'; } when ('Types::Serializer::Boolean') { return $data ? 'true' : 'false'; } when ('DateTime') { return strftime_rfc3339($data); } when ('Math::BigInt') { return $data->bstr; } when ('Math::BigFloat') { if ($data->is_inf || $data->is_nan) { return lc $data->bstr; } else { return $data->bstr; } } when ('') { # Thanks to ikegami on Stack Overflow for the trick! # https://stackoverflow.com/questions/12686335/how-to-tell-apart-numeric-scalars-and-string-scalars-in-perl/12693984#12693984 # note: this must come before any regex can flip this flag off if (svref_2object(\$data)->FLAGS & (SVf_IOK | SVf_NOK)) { return 'inf' if Math::BigFloat->new($data)->is_inf; return '-inf' if Math::BigFloat->new($data)->is_inf('-'); return 'nan' if Math::BigFloat->new($data)->is_nan; return $data; } #return $data if svref_2object(\$data)->FLAGS & (SVf_IOK | SVf_NOK); return $data if $data =~ /$DateTime/; return lc($data) if $data =~ /^$SpecialFloat$/; return to_toml_string($data); } default{ die 'unhandled: '.Dumper($_); } } } sub to_toml_inline_table { my ($data, $param) = @_; my @buff; for my $key (keys %$data) { my $value = $data->{$key}; if (ref $value eq 'HASH') { push @buff, $key . '=' . to_toml_inline_table($value); } else { push @buff, $key . '=' . to_toml($value); } } return '{' . join(', ', @buff) . '}'; } sub to_toml_table { my ($data, $param) = @_; my @buff_assign; my @buff_tables; # Generate simple key/value pairs for scalar data for my $k (grep{ ref($data->{$_}) !~ /HASH|ARRAY/ } sort keys %$data) { my $key = to_toml_key($k); my $val = to_toml($data->{$k}, $param); push @buff_assign, "$key=$val"; } # For arrays, generate an array of tables if all elements of the array are # hashes. For mixed arrays, generate an inline array. ARRAY: for my $k (grep{ ref $data->{$_} eq 'ARRAY' } sort keys %$data) { # Empty table if (!@{$data->{$k}}) { my $key = to_toml_key($k); push @buff_assign, "$key=[]"; next ARRAY; } # Mixed array if (grep{ ref $_ ne 'HASH' } @{$data->{$k}}) { my $key = to_toml_key($k); my $val = to_toml($data->{$k}, $param); push @buff_assign, "$key=$val"; } # Array of tables else { push @KEYS, $k; for (@{ $data->{$k} }) { push @buff_tables, '', '[[' . join('.', map{ to_toml_key($_) } @KEYS) . ']]'; push @buff_tables, to_toml($_); } pop @KEYS; } } # Sub-tables for my $k (grep{ ref $data->{$_} eq 'HASH' } sort keys %$data) { if (!keys(%{$data->{$k}})) { # Empty table my $key = to_toml_key($k); push @buff_assign, "$key={}"; } else { # Generate [table] push @KEYS, $k; push @buff_tables, '', '[' . join('.', map{ to_toml_key($_) } @KEYS) . ']'; push @buff_tables, to_toml($data->{$k}, $param); pop @KEYS; } } join "\n", @buff_assign, @buff_tables; } sub to_toml_array { my ($data, $param) = @_; if (@$data && $param->{strict}) { my ($ok, $err) = is_strict_array($data); die "toml: found heterogenous array, but strict is set ($err)\n" unless $ok; } my @items; for my $item (@$data) { if (ref $item eq 'HASH') { push @items, to_toml_inline_table($item, $param); } else { push @items, to_toml($item, $param); } } return "[\n" . join("\n", map{ " $_," } @items) . "\n]"; } sub to_toml_key { my $str = shift; if ($str =~ /^$BareKey$/) { return $str; } # Escape control characters $str =~ s/([\p{General_Category=Control}])/'\\u00' . unpack('H2', $1)/eg; # Escape unicode characters #$str =~ s/($NonASCII)/'\\u00' . unpack('H2', $1)/eg; if ($str =~ /^"/) { return qq{'$str'}; } else { return qq{"$str"}; } } sub to_toml_string { state $escape = { "\n" => '\n', "\r" => '\r', "\t" => '\t', "\f" => '\f', "\b" => '\b', "\"" => '\"', "\\" => '\\\\', "\'" => '\\\'', }; my ($arg) = @_; $arg =~ s/(["\\\b\f\n\r\t])/$escape->{$1}/g; $arg =~ s/([\p{General_Category=Control}])/'\\u00' . unpack('H2', $1)/eg; return '"' . $arg . '"'; } #------------------------------------------------------------------------------- # Adapted from DateTime::Format::RFC3339. #------------------------------------------------------------------------------- sub strftime_rfc3339 { my ($dt) = @_; my $tz; #----------------------------------------------------------------------------- # Calculate the time zone offset for non-UTC time zones. # # TOML uses RFC3339 for datetimes, but supports a "local datetime" which # excludes the timezone offset. A DateTime with a floating time zone # indicates a TOML local datetime. # # DateTime::Format::RFC3339 requires a time zone, however, and defaults to # +00:00 for floating time zones. To support local datetimes in output, # format the datetime as RFC3339 and strip the timezone when encountering a # floating time zone. #----------------------------------------------------------------------------- if ($dt->time_zone_short_name eq 'floating') { $tz = ''; } elsif ($dt->time_zone->is_utc) { $tz = 'Z'; } else { my $sign = $dt->offset < 0 ? '-' : '+'; my $secs = abs $dt->offset; my $mins = int($secs / 60); $secs %= 60; my $hours = int($mins / 60); $mins %= 60; if ($secs) { $dt = $dt->clone; $dt->set_time_zone('UTC'); $tz = 'Z'; } else { $tz = sprintf '%s%02d:%02d', $sign, $hours, $mins; } } my $format = $dt->nanosecond ? '%Y-%m-%dT%H:%M:%S.%9N' : '%Y-%m-%dT%H:%M:%S'; return $dt->strftime($format) . $tz; } 1; __END__ =pod =encoding UTF-8 =head1 NAME TOML::Tiny::Writer =head1 VERSION version 0.15 =head1 AUTHOR Jeff Ober =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Grammar.pm100644001750001750 1675314105470632 17751 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOML/Tinypackage TOML::Tiny::Grammar; # ABSTRACT: exports regex definitions used to parse TOML source $TOML::Tiny::Grammar::VERSION = '0.15'; use strict; use warnings; use v5.18; use parent 'Exporter'; our @EXPORT = qw( $WS $CRLF $EOL $Comment $NonASCII $BareKey $QuotedKey $SimpleKey $DottedKey $Key $Boolean $Escape $StringLiteral $MultiLineStringLiteral $BasicString $MultiLineString $String $Date $Time $DateTime $TimeOffset $Hex $Oct $Bin $Dec $Integer $Float $SpecialFloat ); #------------------------------------------------------------------------------- # Primitives #------------------------------------------------------------------------------- our $WS = qr/[\x20\x09]/; # space, tab our $CRLF = qr/\x0D?\x0A/; # cr? lf our $CommentChar = qr/(?>[^[:cntrl:]]|\t)/; # non-control chars other than tab our $Comment = qr/\x23$CommentChar*/; # #comment our $EOL = qr/$Comment?$CRLF/; # crlf or comment + crlf our $Boolean = qr/\b(?:true)|(?:false)\b/; our $NonASCII = qr/[\x80-\x{D7FF}\x{E000}-\x{10FFFF}]/; #------------------------------------------------------------------------------- # Strings #------------------------------------------------------------------------------- our $Escape = qr{ \x5C # leading \ (?> [\x5C"btfnr] # escapes: \\ \" \b \t \n \f \r | (?> u [_0-9a-fA-F]{4}) # unicode (4 bytes) | (?> U [_0-9a-fA-F]{8}) # unicode (8 bytes) ) }x; our $LiteralChar = qr{ [\x09\x20-\x26\x28-\x7E] | $NonASCII }x; our $StringLiteral = qr{ ' (?: $LiteralChar )* ' }x; our $MLLChar = qr{ [\x09\x20-\x26\x28-\x7E] | $NonASCII }x; our $MLLContent = qr{ $MLLChar | $CRLF }x; our $MLLQuotes = qr{ '{1,2} }x; our $MLLBody = qr{ $MLLContent* (?: $MLLQuotes | $MLLContent{0,1} )*? $MLLQuotes? }x; our $MultiLineStringLiteral = qr{ ''' (?: $CRLF? $MLLBody ) ''' }x; our $BasicChar = qr{ $WS | [\x21\x23-\x5B\x5D-\x7E] | $NonASCII | $Escape }x; our $BasicString = qr{ " (?: $BasicChar )* " }x; our $MLBEscapedNL = qr{ \x5c $WS* $CRLF (?: $WS | $CRLF)* }x; our $MLBUnescaped = qr{ $WS | [\x21\x23-\x5B\x5D-\x7E] | $NonASCII }x; our $MLBQuotes = qr{ "{1,2} }x; our $MLBChar = qr{ $MLBUnescaped | $Escape }x; our $MLBContent = qr{ $MLBChar | $CRLF | $MLBEscapedNL }x; our $MLBasicBody = qr{ $MLBContent* (?: $MLBQuotes | $MLBContent{0,1} )*? $MLBQuotes? }x; our $MultiLineString = qr{ """ $CRLF? $MLBasicBody """ }x; our $String = qr/$MultiLineString | $BasicString | $MultiLineStringLiteral | $StringLiteral/x; #------------------------------------------------------------------------------- # Keys #------------------------------------------------------------------------------- our $BareKey = qr/[-_\p{PosixAlnum}]+/; our $QuotedKey = qr/$BasicString|$StringLiteral/; our $SimpleKey = qr/$QuotedKey|$BareKey/; our $DottedKey = qr/$SimpleKey (?: $WS* \. $WS* $SimpleKey)+/x; our $Key = qr{ (?: $DottedKey | $SimpleKey ) }x; #----------------------------------------------------------------------------- # Dates (RFC 3339) # 1985-04-12T23:20:50.52Z #----------------------------------------------------------------------------- our $DateFullYear = qr{ \d{4} }x; our $DateMonth = qr{ (?: 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 ) }x; our $DateDay = qr{ (?: 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 ) }x; our $TimeDelim = qr{ (?: [tT] | \x20 ) }x; our $TimeHour = qr{ (?: 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 ) }x; our $TimeMinute = qr{ (?: 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 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 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 ) }x; our $TimeSecond = qr{ (?: 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 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 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 ) }x; # may be 60 during leap second our $TimeSecFrac = qr{ \. \d+ }x; our $TimeNumOffset = qr{ (?: [-+] $TimeHour : $TimeMinute ) }x; our $TimeOffset = qr{ (?: [zZ] | $TimeNumOffset ) }x; our $PartialTime = qr{ (?: $TimeHour : $TimeMinute : $TimeSecond $TimeSecFrac? ) }x; our $FullTime = qr{ (?: $PartialTime $TimeOffset ) }x; our $FullDate = qr{ (?: $DateFullYear - $DateMonth - $DateDay ) }x; our $OffsetDateTime = qr{ (?: $FullDate $TimeDelim $FullTime ) }x; our $LocalDateTime = qr{ (?: $FullDate $TimeDelim $PartialTime ) }x; our $LocalDate = qr{ (?: $FullDate ) }x; our $LocalTime = qr{ (?: $PartialTime ) }x; our $DateTime = qr{ (?: $OffsetDateTime | $LocalDateTime | $LocalDate | $LocalTime ) }x; #----------------------------------------------------------------------------- # Integer #----------------------------------------------------------------------------- our $DecFirstChar = qr/[1-9]/; our $DecChar = qr/[0-9]/; our $HexChar = qr/[0-9a-fA-F]/; our $OctChar = qr/[0-7]/; our $BinChar = qr/[01]/; our $Zero = qr/[-+]? 0/x; our $Hex = qr/0x $HexChar (?> _? $HexChar )*/x; our $Oct = qr/0o $OctChar (?> _? $OctChar )*/x; our $Bin = qr/0b $BinChar (?> _? $BinChar )*/x; our $Dec = qr/$Zero | (?> [-+]? $DecFirstChar (?> _? $DecChar )* )/x; our $Integer = qr/$Hex | $Oct | $Bin | $Dec/x; #----------------------------------------------------------------------------- # Float #----------------------------------------------------------------------------- our $SpecialFloat = qr/[-+]? (?: (?:inf) | (?:nan) | (?:NaN) )/x; our $Fraction = qr/\. $DecChar (?> _? $DecChar)*/x; our $Exponent = qr{ [eE] (?> $Zero+ # dec matches only one zero, but toml exponents apparently accept e00 | $Dec ) }x; our $Float = qr{ (?> $Dec (?> (?> $Fraction $Exponent?) | $Exponent ) ) | $SpecialFloat }x; 1; __END__ =pod =encoding UTF-8 =head1 NAME TOML::Tiny::Grammar - exports regex definitions used to parse TOML source =head1 VERSION version 0.15 =head1 SYNOPSIS use TOML::Tiny::Grammar; if ($src =~ /$MultiLineString/) { ... } =head1 DESCRIPTION Exports various regexex for parsing TOML source. =head1 PATTERNS =head2 White space and ignorables =head3 $WS =head3 $CRLF =head3 $EOL =head3 $Comment =head2 Keys =head3 $BareKey =head3 $QuotedKey =head3 $SimpleKey =head3 $DottedKey =head3 $Key =head2 Values =head3 $Boolean =head3 $Escape =head3 $StringLiteral =head3 $MultiLineStringLiteral =head3 $BasicString =head3 $MultiLineString =head3 $String =head3 $Date =head3 $Time =head3 $DateTime =head3 $Hex =head3 $Oct =head3 $Bin =head3 $Dec =head3 $Integer =head3 $Float =head2 $SpecialFloat =head1 AUTHOR Jeff Ober =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Tokenizer.pm100644001750001750 1357714105470632 20336 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/lib/TOML/Tinypackage TOML::Tiny::Tokenizer; # ABSTRACT: tokenizer used by TOML::Tiny $TOML::Tiny::Tokenizer::VERSION = '0.15'; use strict; use warnings; no warnings qw(experimental); use charnames qw(:full); use v5.18; use TOML::Tiny::Grammar; sub new { my ($class, %param) = @_; my $self = bless{ source => $param{source}, last_position => length $param{source}, position => 0, line => 1, last_token => undef, }, $class; return $self; } sub last_token { my $self = shift; return $self->{last_token}; } sub next_token { my $self = shift; return unless defined $self->{source} && $self->{position} < $self->{last_position}; if (!$self->{last_token}) { return $self->{last_token} = {type => 'table', pos => 0, line => 1, value => []}; } # Update the regex engine's position marker in case some other regex # attempted to match against the source string and reset it. pos($self->{source}) = $self->{position}; my $token; my $type; my $value; state $key_set = qr/\G ($Key) $WS* (?= =)/x; state $table = qr/\G \[ $WS* ($Key) $WS* \] $WS* (?:$EOL | $)/x; state $array_table = qr/\G \[\[ $WS* ($Key) $WS* \]\] $WS* (?:$EOL | $)/x; state $simple = { '[' => 'inline_array', ']' => 'inline_array_close', '{' => 'inline_table', '}' => 'inline_table_close', ',' => 'comma', '=' => 'assign', 'true' => 'bool', 'false' => 'bool', }; # More complex matches with regexps while ($self->{position} < $self->{last_position} && !defined($type)) { my $prev = $self->{last_token} ? $self->{last_token}{type} : 'EOL'; my $newline = !!($prev eq 'EOL' || $prev eq 'table' || $prev eq 'array_table'); for ($self->{source}) { /\G$WS+/gc; # ignore whitespace /\G$Comment$/mgc && next; # ignore comments last when /\G$/gc; when (/\G$EOL/gc) { ++$self->{line}; $type = 'EOL'; } if ($newline) { when (/$table/gc) { $type = 'table'; $value = $self->tokenize_key($1); } when (/$array_table/gc) { $type = 'array_table'; $value = $self->tokenize_key($1); } } when (/$key_set/gc) { $type = 'key'; $value = $1; } when (/\G ( [\[\]{}=,] | true | false )/xgc) { $value = $1; $type = $simple->{$value}; } when (/\G($String)/gc) { $type = 'string'; $value = $1; } when (/\G($DateTime)/gc) { $type = 'datetime'; $value = $1; } when (/\G($Float)/gc) { $type = 'float'; $value = $1; } when (/\G($Integer)/gc) { $type = 'integer'; $value = $1; } default{ my $substr = substr($self->{source}, $self->{position}, 30) // 'undef'; die "toml syntax error on line $self->{line}\n\t-->|$substr|\n"; } } if ($type) { state $tokenizers = {}; my $tokenize = $tokenizers->{$type} //= $self->can("tokenize_$type") || 0; $token = { line => $self->{line}, pos => $self->{pos}, type => $type, value => $tokenize ? $tokenize->($self, $value) : $value, prev => $self->{last_token}, }; # Unset the previous token's 'prev' key to prevent keeping the entire # chain of previously parsed tokens alive for the whole process. undef $self->{last_token}{prev}; $self->{last_token} = $token; } $self->update_position; } return $token; } sub current_line { my $self = shift; my $rest = substr $self->{source}, $self->{position}; my $stop = index $rest, "\n"; substr $rest, 0, $stop; } sub update_position { my $self = shift; $self->{position} = pos($self->{source}) // 0; } sub error { my $self = shift; my $token = shift; my $msg = shift // 'unknown'; my $line = $token ? $token->{line} : $self->{line}; die "toml: parse error at line $line: $msg\n"; } sub tokenize_key { my $self = shift; my $toml = shift; my @segs = $toml =~ /($SimpleKey)\.?/g; my @keys; for my $seg (@segs) { $seg =~ s/^["']//; $seg =~ s/["']$//; $seg = $self->unescape_str($seg); push @keys, $seg; } return \@keys; } sub tokenize_float { $_[1] =~ tr/_//d; $_[1]; } sub tokenize_integer { $_[1] =~ tr/_+//d; $_[1]; } sub tokenize_string { my $self = shift; my $toml = shift; my $ml = index($toml, q{'''}) == 0 || index($toml, q{"""}) == 0; my $lit = index($toml, q{'}) == 0; my $str = ''; if ($ml) { $str = substr $toml, 3, length($toml) - 6; my @newlines = $str =~ /($CRLF)/g; $self->{line} += scalar @newlines; $str =~ s/^$WS* $CRLF//x; # trim leading whitespace $str =~ s/\\$EOL\s*//xgs; # trim newlines from lines ending in backslash } else { $str = substr($toml, 1, length($toml) - 2); } if (!$lit) { $str = $self->unescape_str($str); } return $str; } sub unescape_chars { state $esc = { '\b' => "\x08", '\t' => "\x09", '\n' => "\x0A", '\f' => "\x0C", '\r' => "\x0D", '\"' => "\x22", '\/' => "\x2F", '\\\\' => "\x5C", }; if (exists $esc->{$_[0]}) { return $esc->{$_[0]}; } my $hex = hex substr($_[0], 2); if ($hex < 0x10FFFF && charnames::viacode($hex)) { return chr $hex; } return; } sub unescape_str { state $re = qr/($Escape)/; $_[1] =~ s|$re|unescape_chars($1) // $_[0]->error(undef, "invalid unicode escape: $1")|xge; $_[1]; } 1; __END__ =pod =encoding UTF-8 =head1 NAME TOML::Tiny::Tokenizer - tokenizer used by TOML::Tiny =head1 VERSION version 0.15 =head1 AUTHOR Jeff Ober =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2021 by Jeff Ober. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut valid000755001750001750 014105470632 16657 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-testexample.t100644001750001750 1402014105470632 20654 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/example.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "best-day-ever" => "1987-07-05T17:45:00Z", "numtheory" => { "boring" => 0, "perfection" => [ bless( { "_file" => "(eval 164)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('6')->beq($got); }, "name" => "Math::BigInt->new(\"6\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 165)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('28')->beq($got); }, "name" => "Math::BigInt->new(\"28\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 166)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('496')->beq($got); }, "name" => "Math::BigInt->new(\"496\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] } }; my $actual = from_toml($toml); is($actual, $expected1, 'example - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'example - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'example - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;key000755001750001750 014105470632 17447 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validempty.t100644001750001750 235214105470632 21134 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/empty.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "" => "blank" }; my $actual = from_toml($toml); is($actual, $expected1, 'key/empty - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/empty - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/empty - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;space.t100644001750001750 444514105470632 21076 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/space.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a b" => bless( { "_file" => "(eval 290)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'key/space - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/space - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/space - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;string000755001750001750 014105470632 20165 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validnl.t100644001750001750 263014105470632 21124 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/nl.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "lit_nl_end" => "value\\n", "lit_nl_mid" => "val\\nue", "lit_nl_uni" => "val\\ue", "nl_end" => "value\n", "nl_mid" => "val\nue" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/nl - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/nl - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/nl - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;bool000755001750001750 014105470632 17612 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validbool.t100644001750001750 237614105470632 21102 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/bool# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/bool/bool.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "f" => 0, "t" => 1 }; my $actual = from_toml($toml); is($actual, $expected1, 'bool/bool - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'bool/bool - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'bool/bool - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;key000755001750001750 014105470632 17776 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidhash.t100644001750001750 62714105470632 21233 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/hash.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/hash'; done_testing;empty-file.t100644001750001750 230314105470632 21255 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/empty-file.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = {}; my $actual = from_toml($toml); is($actual, $expected1, 'empty-file - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'empty-file - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'empty-file - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;example.toml100644001750001750 13314105470632 21324 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validbest-day-ever = 1987-07-05T17:45:00Z [numtheory] boring = false perfection = [6, 28, 496] newline-lf.t100644001750001750 242114105470632 21243 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/newline-lf.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "newline" => "lf", "os" => "unix" }; my $actual = from_toml($toml); is($actual, $expected1, 'newline-lf - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'newline-lf - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'newline-lf - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;dotted.t100644001750001750 7027414105470632 21311 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/dotted.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "few" => { "dots" => { "polka" => { "dance-with" => "Dot", "dot" => "again?" } } } }, "arr" => [ { "a" => { "b" => { "c" => bless( { "_file" => "(eval 263)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d" => bless( { "_file" => "(eval 264)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } }, { "a" => { "b" => { "c" => bless( { "_file" => "(eval 266)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d" => bless( { "_file" => "(eval 265)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('4')->beq($got); }, "name" => "Math::BigInt->new(\"4\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } ], "count" => { "a" => bless( { "_file" => "(eval 274)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "b" => bless( { "_file" => "(eval 275)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "c" => bless( { "_file" => "(eval 270)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d" => bless( { "_file" => "(eval 271)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('4')->beq($got); }, "name" => "Math::BigInt->new(\"4\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "e" => bless( { "_file" => "(eval 278)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('5')->beq($got); }, "name" => "Math::BigInt->new(\"5\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f" => bless( { "_file" => "(eval 276)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('6')->beq($got); }, "name" => "Math::BigInt->new(\"6\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "g" => bless( { "_file" => "(eval 279)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('7')->beq($got); }, "name" => "Math::BigInt->new(\"7\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "h" => bless( { "_file" => "(eval 277)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8')->beq($got); }, "name" => "Math::BigInt->new(\"8\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "i" => bless( { "_file" => "(eval 272)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('9')->beq($got); }, "name" => "Math::BigInt->new(\"9\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "j" => bless( { "_file" => "(eval 273)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('10')->beq($got); }, "name" => "Math::BigInt->new(\"10\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "k" => bless( { "_file" => "(eval 280)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('11')->beq($got); }, "name" => "Math::BigInt->new(\"11\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "l" => bless( { "_file" => "(eval 269)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('12')->beq($got); }, "name" => "Math::BigInt->new(\"12\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, "many" => { "dots" => { "here" => { "dot" => { "dot" => { "dot" => bless( { "_file" => "(eval 268)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } } }, "name" => { "first" => "Arthur", "last" => "Dent" }, "tbl" => { "a" => { "b" => { "c" => bless( { "_file" => "(eval 267)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('42.666')->beq($got); }, "name" => "Math::BigFloat->new(\"42.666\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } }; my $actual = from_toml($toml); is($actual, $expected1, 'key/dotted - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/dotted - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/dotted - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;raw.t100644001750001750 332214105470632 21303 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/raw.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "backslash" => "This string has a \\\\ backslash character.", "backspace" => "This string has a \\b backspace character.", "carriage" => "This string has a \\r carriage return character.", "formfeed" => "This string has a \\f form feed character.", "newline" => "This string has a \\n new line character.", "slash" => "This string has a \\/ slash character.", "tab" => "This string has a \\t tab character." }; my $actual = from_toml($toml); is($actual, $expected1, 'string/raw - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/raw - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/raw - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;float000755001750001750 014105470632 17764 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validlong.t100644001750001750 715514105470632 21260 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/float/long.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "longpi" => bless( { "_file" => "(eval 185)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3.141592653589793')->beq($got); }, "name" => "Math::BigFloat->new(\"3.141592653589793\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "neglongpi" => bless( { "_file" => "(eval 186)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('-3.141592653589793')->beq($got); }, "name" => "Math::BigFloat->new(\"-3.141592653589793\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'float/long - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'float/long - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'float/long - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;zero.t100644001750001750 2140014105470632 21305 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/float/zero.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "f1" => bless( { "_file" => "(eval 194)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f2" => bless( { "_file" => "(eval 196)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f3" => bless( { "_file" => "(eval 192)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f4" => bless( { "_file" => "(eval 193)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f5" => bless( { "_file" => "(eval 195)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f6" => bless( { "_file" => "(eval 191)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "f7" => bless( { "_file" => "(eval 190)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0')->beq($got); }, "name" => "Math::BigFloat->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'float/zero - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'float/zero - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'float/zero - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array000755001750001750 014105470632 17775 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validbool.t100644001750001750 246614105470632 21265 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/bool.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => [ 1, 0 ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/bool - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/bool - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/bool - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.t100644001750001750 63114105470632 21441 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/empty.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/empty'; done_testing;space.t100644001750001750 63114105470632 21376 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/space.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/space'; done_testing;numeric.t100644001750001750 441314105470632 21440 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/numeric.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "1" => bless( { "_file" => "(eval 282)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'key/numeric - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/numeric - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/numeric - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;escapes.t100644001750001750 311714105470632 21421 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/escapes.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "\n" => "newline", "\"" => "just a quote", "\"quoted\"" => { "quote" => 1 }, "a.b" => { "\x{c0}" => {} }, "backsp\b\b" => {}, "\x{c0}" => "latin capital letter A with grave" }; my $actual = from_toml($toml); is($actual, $expected1, 'key/escapes - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/escapes - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/escapes - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;float.t100644001750001750 1350014105470632 21435 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/float/float.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "negpi" => bless( { "_file" => "(eval 175)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('-3.14')->beq($got); }, "name" => "Math::BigFloat->new(\"-3.14\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "pi" => bless( { "_file" => "(eval 176)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3.14')->beq($got); }, "name" => "Math::BigFloat->new(\"3.14\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "pospi" => bless( { "_file" => "(eval 178)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3.14')->beq($got); }, "name" => "Math::BigFloat->new(\"3.14\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "zero-intpart" => bless( { "_file" => "(eval 177)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0.123')->beq($got); }, "name" => "Math::BigFloat->new(\"0.123\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'float/float - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'float/float - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'float/float - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;table000755001750001750 014105470632 17746 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validempty.t100644001750001750 235614105470632 21437 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/empty.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => {} }; my $actual = from_toml($toml); is($actual, $expected1, 'table/empty - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/empty - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/empty - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;names.t100644001750001750 415314105470632 21401 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/names.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { " x " => {}, "b" => { "c" => {} }, "b.c" => {}, "d.e" => {} }, "d" => { "e" => { "f" => {} } }, "g" => { "h" => { "i" => {} } }, "j" => { "\x{29e}" => { "l" => {} } }, "x" => { "1" => { "2" => {} } } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/names - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/names - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/names - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array.t100644001750001750 2615414105470632 21470 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/array.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "comments" => [ bless( { "_file" => "(eval 116)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 117)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], "dates" => [ "1987-07-05T17:45:00Z", "1979-05-27T07:32:00Z", "2006-06-01T11:00:00Z" ], "floats" => [ bless( { "_file" => "(eval 118)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('1.1')->beq($got); }, "name" => "Math::BigFloat->new(\"1.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 119)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('2.1')->beq($got); }, "name" => "Math::BigFloat->new(\"2.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 120)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3.1')->beq($got); }, "name" => "Math::BigFloat->new(\"3.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], "ints" => [ bless( { "_file" => "(eval 48)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 114)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 115)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], "strings" => [ "a", "b", "c" ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/array - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/array - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/array - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.t100644001750001750 300414105470632 21455 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/empty.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "thevoid" => [ [ [ [ [] ] ] ] ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/empty - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/empty - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/empty - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;escape.t100644001750001750 63314105470632 21545 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/escape.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/escape'; done_testing;no-eol.t100644001750001750 63314105470632 21476 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/no-eol.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/no-eol'; done_testing;newline-crlf.t100644001750001750 243214105470632 21572 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/newline-crlf.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "newline" => "crlf", "os" => "DOS" }; my $actual = from_toml($toml); is($actual, $expected1, 'newline-crlf - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'newline-crlf - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'newline-crlf - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.toml100644001750001750 1514105470632 21576 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key"" = "blank" alphanum.t100644001750001750 1011014105470632 21612 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/alphanum.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "000111" => "leading", "10e3" => "false float", "123" => "num", "2018_10" => { "001" => bless( { "_file" => "(eval 262)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, "34-11" => bless( { "_file" => "(eval 261)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('23')->beq($got); }, "name" => "Math::BigInt->new(\"23\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "a-a-a" => { "_" => 0 }, "alpha" => "a", "one1two2" => "mixed", "under_score" => "___", "with-dash" => "dashed" }; my $actual = from_toml($toml); is($actual, $expected1, 'key/alphanum - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/alphanum - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/alphanum - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;space.toml100644001750001750 1214105470632 21530 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key"a b" = 1 empty.t100644001750001750 236714105470632 21660 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/empty.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer" => "" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/empty - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/empty - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/empty - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;nl.toml100644001750001750 16314105470632 21613 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringnl_mid = "val\nue" nl_end = """value\n""" lit_nl_end = '''value\n''' lit_nl_mid = 'val\nue' lit_nl_uni = 'val\ue' bool.toml100644001750001750 2314105470632 21535 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/boolt = true f = false integer000755001750001750 014105470632 20314 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validlong.t100644001750001750 734414105470632 21610 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/integer/long.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "int64-max" => bless( { "_file" => "(eval 245)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('9223372036854775807')->beq($got); }, "name" => "Math::BigInt->new(\"9223372036854775807\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "int64-max-neg" => bless( { "_file" => "(eval 246)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('-9223372036854775808')->beq($got); }, "name" => "Math::BigInt->new(\"-9223372036854775808\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'integer/long - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'integer/long - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'integer/long - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;zero.t100644001750001750 3407014105470632 21644 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/integer/zero.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a2" => bless( { "_file" => "(eval 258)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "a3" => bless( { "_file" => "(eval 249)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "b1" => bless( { "_file" => "(eval 253)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "b2" => bless( { "_file" => "(eval 260)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "b3" => bless( { "_file" => "(eval 252)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d1" => bless( { "_file" => "(eval 256)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d2" => bless( { "_file" => "(eval 250)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d3" => bless( { "_file" => "(eval 259)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "h1" => bless( { "_file" => "(eval 251)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "h2" => bless( { "_file" => "(eval 255)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "h3" => bless( { "_file" => "(eval 254)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "o1" => bless( { "_file" => "(eval 257)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'integer/zero - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'integer/zero - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'integer/zero - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;no-eol.t100644001750001750 236614105470632 21473 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/no-eol.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "table" => {} }; my $actual = from_toml($toml); is($actual, $expected1, 'table/no-eol - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/no-eol - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/no-eol - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;nested.t100644001750001750 270614105470632 21611 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/nested.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "nest" => [ [ "a" ], [ "b" ] ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/nested - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/nested - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/nested - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;newline.t100644001750001750 63514105470632 21750 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/newline.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/newline'; done_testing;hash.toml100644001750001750 714105470632 21673 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keya# = 1 table000755001750001750 014105470632 20275 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidempty.t100644001750001750 63514105470632 21744 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/empty.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/empty'; done_testing;empty-file.toml100644001750001750 014105470632 21675 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validnewline-lf.toml100644001750001750 3314105470632 21710 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validos = "unix" newline = "lf" dotted.toml100644001750001750 102714105470632 21767 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# Note: this file contains literal tab characters. name.first = "Arthur" "name".'last' = "Dent" many.dots.here.dot.dot.dot = 42 # Space are ignored, and key parts can be quoted. count.a = 1 count . b = 2 "count"."c" = 3 "count" . "d" = 4 'count'.'e' = 5 'count' . 'f' = 6 "count".'g' = 7 "count" . 'h' = 8 count.'i' = 9 count . 'j' = 10 "count".k = 11 "count" . l = 12 [tbl] a.b.c = 42.666 [a.few.dots] polka.dot = "again?" polka.dance-with = "Dot" [[arr]] a.b.c=1 a.b.d=2 [[arr]] a.b.c=3 a.b.d=4 simple.t100644001750001750 243614105470632 22010 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/simple.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer" => "You are not drinking enough whisky." }; my $actual = from_toml($toml); is($actual, $expected1, 'string/simple - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/simple - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/simple - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;raw.toml100644001750001750 56514105470632 22001 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringbackspace = 'This string has a \b backspace character.' tab = 'This string has a \t tab character.' newline = 'This string has a \n new line character.' formfeed = 'This string has a \f form feed character.' carriage = 'This string has a \r carriage return character.' slash = 'This string has a \/ slash character.' backslash = 'This string has a \\ backslash character.' long.toml100644001750001750 7214105470632 21717 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/floatlongpi = 3.141592653589793 neglongpi = -3.141592653589793 zero.toml100644001750001750 10414105470632 21753 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/floatf1 = 0.0 f2 = +0.0 f3 = -0.0 f4 = 0e0 f5 = 0e00 f6 = +0e0 f7 = -0e0 keyword.t100644001750001750 251714105470632 21764 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/keyword.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "false" => {}, "inf" => {}, "nan" => {}, "true" => {} }; my $actual = from_toml($toml); is($actual, $expected1, 'table/keyword - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/keyword - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/keyword - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;strings.t100644001750001750 273014105470632 22015 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/strings.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "string_array" => [ "all", "strings", "are the same", "type" ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/strings - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/strings - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/strings - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;bool.toml100644001750001750 2214105470632 21717 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraya = [true, false] empty.toml100644001750001750 514105470632 22104 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key = 1 space.toml100644001750001750 1014105470632 22055 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keya b = 1 spec-example-1.t100644001750001750 2663414105470632 21760 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/spec-example-1.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "clients" => { "data" => [ [ "gamma", "delta" ], [ bless( { "_file" => "(eval 298)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 299)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] ], "hosts" => [ "alpha", "omega" ] }, "database" => { "connection_max" => bless( { "_file" => "(eval 297)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('5000')->beq($got); }, "name" => "Math::BigInt->new(\"5000\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "enabled" => 1, "ports" => [ bless( { "_file" => "(eval 294)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8001')->beq($got); }, "name" => "Math::BigInt->new(\"8001\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 295)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8001')->beq($got); }, "name" => "Math::BigInt->new(\"8001\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 296)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8002')->beq($got); }, "name" => "Math::BigInt->new(\"8002\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], "server" => "192.168.1.1" }, "owner" => { "dob" => "1979-05-27T07:32:00-08:00", "name" => "Lance Uppercut" }, "servers" => { "alpha" => { "dc" => "eqdc10", "ip" => "10.0.0.1" }, "beta" => { "dc" => "eqdc10", "ip" => "10.0.0.2" } }, "title" => "TOML Example" }; my $actual = from_toml($toml); is($actual, $expected1, 'spec-example-1 - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'spec-example-1 - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'spec-example-1 - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;numeric.toml100644001750001750 614105470632 22062 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key1 = 1 escapes.toml100644001750001750 22514105470632 22106 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key"\n" = "newline" "\u00c0" = "latin capital letter A with grave" "\"" = "just a quote" ["backsp\b\b"] ["\"quoted\""] quote = true ["a.b"."\u00c0"] datetime000755001750001750 014105470632 20453 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validlocal.t100644001750001750 256714105470632 22104 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/datetime/local.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "local" => "1987-07-05T17:45:00", "milli" => "1977-12-21T10:32:00.555", "space" => "1987-07-05T17:45:00" }; my $actual = from_toml($toml); is($actual, $expected1, 'datetime/local - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'datetime/local - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'datetime/local - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;escapes.t100644001750001750 431414105470632 22137 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/escapes.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "backslash" => "This string has a \\ backslash character.", "backspace" => "This string has a \b backspace character.", "carriage" => "This string has a \r carriage return character.", "delete" => "This string has a \177 delete control code.", "formfeed" => "This string has a \f form feed character.", "newline" => "This string has a \n new line character.", "notunicode1" => "This string does not have a unicode \\u escape.", "notunicode2" => "This string does not have a unicode \\u escape.", "notunicode3" => "This string does not have a unicode \\u0075 escape.", "notunicode4" => "This string does not have a unicode \\u escape.", "quote" => "This string has a \" quote character.", "tab" => "This string has a \t tab character.", "unitseparator" => "This string has a \37 unit separator control code." }; my $actual = from_toml($toml); is($actual, $expected1, 'string/escapes - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/escapes - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/escapes - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;comment000755001750001750 014105470632 20321 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validat-eof.t100644001750001750 240114105470632 22016 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/comment/at-eof.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "key" => "value" }; my $actual = from_toml($toml); is($actual, $expected1, 'comment/at-eof - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'comment/at-eof - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'comment/at-eof - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;tricky.t100644001750001750 3326414105470632 22203 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/comment/tricky.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "hash#tag" => { "#!" => "hash bang", "arr3" => [ "#", "#", "###" ], "arr4" => [ bless( { "_file" => "(eval 160)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 161)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 162)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 163)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('4')->beq($got); }, "name" => "Math::BigInt->new(\"4\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], "arr5" => [ [ [ [ [ "#" ] ] ] ] ], "tbl1" => { "#" => "}#" } }, "section" => { "8" => "eight", "eleven" => bless( { "_file" => "(eval 158)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('11.1')->beq($got); }, "name" => "Math::BigFloat->new(\"11.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "five" => bless( { "_file" => "(eval 156)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('5.5')->beq($got); }, "name" => "Math::BigFloat->new(\"5.5\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "four" => "# no comment\n# nor this\n#also not comment", "one" => 11, "six" => bless( { "_file" => "(eval 157)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('6')->beq($got); }, "name" => "Math::BigInt->new(\"6\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "ten" => bless( { "_file" => "(eval 159)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('1000.0')->beq($got); }, "name" => "Math::BigFloat->new(\"1000.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "three" => "#", "two" => "22#" } }; my $actual = from_toml($toml); is($actual, $expected1, 'comment/tricky - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'comment/tricky - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'comment/tricky - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;float.toml100644001750001750 7314105470632 22066 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/floatpi = 3.14 pospi = +3.14 negpi = -3.14 zero-intpart = 0.123 exponent.t100644001750001750 2473214105470632 22201 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/float/exponent.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "lower" => bless( { "_file" => "(eval 173)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('300.0')->beq($got); }, "name" => "Math::BigFloat->new(\"300.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "minustenth" => bless( { "_file" => "(eval 170)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('-0.1')->beq($got); }, "name" => "Math::BigFloat->new(\"-0.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "neg" => bless( { "_file" => "(eval 167)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('0.03')->beq($got); }, "name" => "Math::BigFloat->new(\"0.03\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "pointlower" => bless( { "_file" => "(eval 172)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('310.0')->beq($got); }, "name" => "Math::BigFloat->new(\"310.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "pointupper" => bless( { "_file" => "(eval 169)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('310.0')->beq($got); }, "name" => "Math::BigFloat->new(\"310.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "pos" => bless( { "_file" => "(eval 171)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('300.0')->beq($got); }, "name" => "Math::BigFloat->new(\"300.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "upper" => bless( { "_file" => "(eval 174)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('300.0')->beq($got); }, "name" => "Math::BigFloat->new(\"300.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "zero" => bless( { "_file" => "(eval 168)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3.0')->beq($got); }, "name" => "Math::BigFloat->new(\"3.0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'float/exponent - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'float/exponent - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'float/exponent - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.toml100644001750001750 414105470632 22053 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[a] names.toml100644001750001750 13214105470632 22062 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[a.b.c] [a."b.c"] [a.'d.e'] [a.' x '] [ d.e.f ] [ g . h . i ] [ j . "Êž" . 'l' ] [x.1.2] empty.toml100644001750001750 2514105470632 22125 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraythevoid = [[[[[]]]]] nospaces.t100644001750001750 1127214105470632 22160 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/nospaces.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "ints" => [ bless( { "_file" => "(eval 150)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 151)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 152)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/nospaces - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/nospaces - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/nospaces - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array.toml100644001750001750 31514105470632 22127 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arrayints = [1, 2, 3, ] floats = [1.1, 2.1, 3.1] strings = ["a", "b", "c"] dates = [ 1987-07-05T17:45:00Z, 1979-05-27T07:32:00Z, 2006-06-01T11:00:00Z, ] comments = [ 1, 2, #this is ok ] no-eol.toml100644001750001750 1414105470632 22157 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keya = 1 b = 2 escape.toml100644001750001750 5514105470632 22233 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key\u00c0 = "latin capital letter A with grave" duplicate.t100644001750001750 64114105470632 22256 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/duplicate.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/duplicate'; done_testing;multiline.t100644001750001750 64114105470632 22306 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/multiline.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/multiline'; done_testing;datetime000755001750001750 014105470632 21002 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidno-t.t100644001750001750 64114105470632 22165 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/datetime/no-t.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on datetime/no-t'; done_testing;llbrace.t100644001750001750 64114105470632 22207 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/llbrace.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/llbrace'; done_testing;rrbrace.t100644001750001750 64114105470632 22223 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/rrbrace.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/rrbrace'; done_testing;newline-crlf.toml100644001750001750 3614105470632 22240 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validos = "DOS" newline = "crlf" implicit-groups.t100644001750001750 600314105470632 22332 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/implicit-groups.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "b" => { "c" => { "answer" => bless( { "_file" => "(eval 201)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } }; my $actual = from_toml($toml); is($actual, $expected1, 'implicit-groups - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'implicit-groups - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'implicit-groups - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;alphanum.toml100644001750001750 25514105470632 22273 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/keyalpha = "a" 123 = "num" 000111 = "leading" 10e3 = "false float" one1two2 = "mixed" with-dash = "dashed" under_score = "___" 34-11 = 23 [2018_10] 001 = 1 [a-a-a] _ = false quoted-dots.t100644001750001750 2370414105470632 22272 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/quoted-dots.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "plain" => bless( { "_file" => "(eval 289)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "plain_table" => { "plain" => bless( { "_file" => "(eval 287)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "with.dot" => bless( { "_file" => "(eval 288)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('4')->beq($got); }, "name" => "Math::BigInt->new(\"4\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, "table" => { "withdot" => { "key.with.dots" => bless( { "_file" => "(eval 285)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('6')->beq($got); }, "name" => "Math::BigInt->new(\"6\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "plain" => bless( { "_file" => "(eval 286)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('5')->beq($got); }, "name" => "Math::BigInt->new(\"5\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "with.dot" => bless( { "_file" => "(eval 284)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'key/quoted-dots - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/quoted-dots - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/quoted-dots - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.toml100644001750001750 1414105470632 22313 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringanswer = "" at-eof2.t100644001750001750 240514105470632 22104 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/comment/at-eof2.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "key" => "value" }; my $actual = from_toml($toml); is($actual, $expected1, 'comment/at-eof2 - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'comment/at-eof2 - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'comment/at-eof2 - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;long.toml100644001750001750 10514105470632 22264 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integerint64-max = 9223372036854775807 int64-max-neg = -9223372036854775808 integer.t100644001750001750 1354014105470632 22321 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/integer/integer.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer" => bless( { "_file" => "(eval 234)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "neganswer" => bless( { "_file" => "(eval 233)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('-42')->beq($got); }, "name" => "Math::BigInt->new(\"-42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "posanswer" => bless( { "_file" => "(eval 235)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "zero" => bless( { "_file" => "(eval 232)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('0')->beq($got); }, "name" => "Math::BigInt->new(\"0\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'integer/integer - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'integer/integer - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'integer/integer - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;zero.toml100644001750001750 17214105470632 22310 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integerd1 = 0 d2 = +0 d3 = -0 h1 = 0x0 h2 = 0x00 h3 = 0x00000 o1 = 0o0 a2 = 0o00 a3 = 0o00000 b1 = 0b0 b2 = 0b00 b3 = 0b00000 array-one.t100644001750001750 272114105470632 22172 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/array-one.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "people" => [ { "first_name" => "Bruce", "last_name" => "Springsteen" } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'table/array-one - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/array-one - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/array-one - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;no-eol.toml100644001750001750 1014105470632 22123 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[table] sub-empty.t100644001750001750 246714105470632 22231 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/sub-empty.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "b" => {} } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/sub-empty - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/sub-empty - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/sub-empty - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;nested.toml100644001750001750 2614105470632 22252 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraynest = [["a"], ["b"]] newline.toml100644001750001750 2114105470632 22425 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keybarekey = 123 two-equals.t100644001750001750 64314105470632 22407 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/two-equals.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/two-equals'; done_testing;encoding000755001750001750 014105470632 20774 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidutf16.t100644001750001750 64314105470632 22251 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/utf16.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/utf16'; done_testing;empty.toml100644001750001750 314105470632 22401 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[] redefine.t100644001750001750 64314105470632 22366 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/redefine.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/redefine'; done_testing;array000755001750001750 014105470632 20324 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidtables-2.t100644001750001750 64314105470632 22245 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/tables-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/tables-2'; done_testing;tables-1.t100644001750001750 64314105470632 22244 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/tables-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/tables-1'; done_testing;no-close.t100644001750001750 64314105470632 22353 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/no-close.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/no-close'; done_testing;special-word.t100644001750001750 701414105470632 22367 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/special-word.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "false" => 0, "inf" => bless( { "_file" => "(eval 292)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('100000000')->beq($got); }, "name" => "Math::BigInt->new(\"100000000\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "nan" => "ceci n'est pas un nombre", "true" => bless( { "_file" => "(eval 293)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'key/special-word - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/special-word - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/special-word - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;simple.toml100644001750001750 5714105470632 22455 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringanswer = "You are not drinking enough whisky." literals.t100644001750001750 2636414105470632 22513 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/integer/literals.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "bin1" => bless( { "_file" => "(eval 236)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('214')->beq($got); }, "name" => "Math::BigInt->new(\"214\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "bin2" => bless( { "_file" => "(eval 244)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('5')->beq($got); }, "name" => "Math::BigInt->new(\"5\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "hex1" => bless( { "_file" => "(eval 237)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3735928559')->beq($got); }, "name" => "Math::BigInt->new(\"3735928559\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "hex2" => bless( { "_file" => "(eval 242)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3735928559')->beq($got); }, "name" => "Math::BigInt->new(\"3735928559\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "hex3" => bless( { "_file" => "(eval 243)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3735928559')->beq($got); }, "name" => "Math::BigInt->new(\"3735928559\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "hex4" => bless( { "_file" => "(eval 240)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2439')->beq($got); }, "name" => "Math::BigInt->new(\"2439\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "oct1" => bless( { "_file" => "(eval 241)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('342391')->beq($got); }, "name" => "Math::BigInt->new(\"342391\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "oct2" => bless( { "_file" => "(eval 239)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('493')->beq($got); }, "name" => "Math::BigInt->new(\"493\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "oct3" => bless( { "_file" => "(eval 238)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('501')->beq($got); }, "name" => "Math::BigInt->new(\"501\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'integer/literals - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'integer/literals - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'integer/literals - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;underscore.t100644001750001750 1133714105470632 22507 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/float/underscore.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "after" => bless( { "_file" => "(eval 187)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3141.5927')->beq($got); }, "name" => "Math::BigFloat->new(\"3141.5927\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "before" => bless( { "_file" => "(eval 189)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3141.5927')->beq($got); }, "name" => "Math::BigFloat->new(\"3141.5927\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "exponent" => bless( { "_file" => "(eval 188)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('3.0e14')->beq($got); }, "name" => "Math::BigFloat->new(\"3.0e14\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'float/underscore - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'float/underscore - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'float/underscore - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;with-pound.t100644001750001750 532714105470632 22400 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/with-pound.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "key#group" => { "answer" => bless( { "_file" => "(eval 307)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/with-pound - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/with-pound - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/with-pound - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array-many.t100644001750001750 345614105470632 22363 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/array-many.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "people" => [ { "first_name" => "Bruce", "last_name" => "Springsteen" }, { "first_name" => "Eric", "last_name" => "Clapton" }, { "first_name" => "Bob", "last_name" => "Seger" } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'table/array-many - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/array-many - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/array-many - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;whitespace.t100644001750001750 241214105470632 22426 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/whitespace.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "valid key" => {} }; my $actual = from_toml($toml); is($actual, $expected1, 'table/whitespace - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/whitespace - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/whitespace - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array-nest.t100644001750001750 454114105470632 22364 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/array-nest.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "albums" => [ { "name" => "Born to Run", "songs" => [ { "name" => "Jungleland" }, { "name" => "Meeting Across the River" } ] }, { "name" => "Born in the USA", "songs" => [ { "name" => "Glory Days" }, { "name" => "Dancing in the Dark" } ] } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'table/array-nest - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/array-nest - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/array-nest - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;keyword.toml100644001750001750 4014105470632 22421 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[true] [false] [inf] [nan] strings.toml100644001750001750 10314105470632 22475 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraystring_array = [ "all", 'strings', """are the same""", '''type'''] two-equals3.t100644001750001750 64514105470632 22474 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/two-equals3.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/two-equals3'; done_testing;after-value.t100644001750001750 64514105470632 22523 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/after-value.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/after-value'; done_testing;after-table.t100644001750001750 64514105470632 22476 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/after-table.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/after-table'; done_testing;after-array.t100644001750001750 64514105470632 22525 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/after-array.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/after-array'; done_testing;two-equals2.t100644001750001750 64514105470632 22473 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/two-equals2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/two-equals2'; done_testing;string000755001750001750 014105470632 20514 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidno-close.t100644001750001750 64514105470632 22545 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/no-close.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/no-close'; done_testing;bool000755001750001750 014105470632 20141 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidmixed-case.t100644001750001750 64514105470632 22472 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/bool# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/bool/mixed-case.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on bool/mixed-case'; done_testing;duplicate.t100644001750001750 64514105470632 22561 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/duplicate.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/duplicate'; done_testing;spec-example-1.toml100644001750001750 105714105470632 22440 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# This is a TOML document. Boom. title = "TOML Example" [owner] name = "Lance Uppercut" dob = 1979-05-27T07:32:00-08:00 # First class dates? Why not? [database] server = "192.168.1.1" ports = [ 8001, 8001, 8002 ] connection_max = 5000 enabled = true [servers] # You can indent as you please. Tabs or spaces. TOML don't care. [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] ip = "10.0.0.2" dc = "eqdc10" [clients] data = [ ["gamma", "delta"], [1, 2] ] # Line breaks are OK when inside arrays hosts = [ "alpha", "omega" ] special-chars.t100644001750001750 560714105470632 22522 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/special-chars.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "~!\@\$^&*()_+-`1234567890[]|/?><.,;:'" => bless( { "_file" => "(eval 291)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'key/special-chars - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/special-chars - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/special-chars - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;timezone.t100644001750001750 267514105470632 22644 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/datetime/timezone.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "nzdt" => "1987-07-05T17:45:56+13:00", "nzst" => "1987-07-05T17:45:56+12:00", "pdt" => "1987-07-05T17:45:56-05:00", "utc" => "1987-07-05T17:45:56Z" }; my $actual = from_toml($toml); is($actual, $expected1, 'datetime/timezone - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'datetime/timezone - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'datetime/timezone - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;datetime.t100644001750001750 252014105470632 22573 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/datetime/datetime.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "lower" => "1987-07-05T17:45:00Z", "space" => "1987-07-05T17:45:00Z" }; my $actual = from_toml($toml); is($actual, $expected1, 'datetime/datetime - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'datetime/datetime - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'datetime/datetime - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;local.toml100644001750001750 13014105470632 22554 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetimelocal = 1987-07-05T17:45:00 milli = 1977-12-21T10:32:00.555 space = 1987-07-05 17:45:00 with-pound.t100644001750001750 255414105470632 22616 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/with-pound.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "pound" => "We see no # comments here.", "poundcomment" => "But there are # some comments here." }; my $actual = from_toml($toml); is($actual, $expected1, 'string/with-pound - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/with-pound - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/with-pound - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;escapes.toml100644001750001750 140314105470632 22643 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringbackspace = "This string has a \b backspace character." tab = "This string has a \t tab character." newline = "This string has a \n new line character." formfeed = "This string has a \f form feed character." carriage = "This string has a \r carriage return character." quote = "This string has a \" quote character." backslash = "This string has a \\ backslash character." notunicode1 = "This string does not have a unicode \\u escape." notunicode2 = "This string does not have a unicode \u005Cu escape." notunicode3 = "This string does not have a unicode \\u0075 escape." notunicode4 = "This string does not have a unicode \\\u0075 escape." delete = "This string has a \u007F delete control code." unitseparator = "This string has a \u001F unit separator control code." inline-table000755001750001750 014105470632 21222 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/validnest.t100644001750001750 3024214105470632 22541 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/nest.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "arr_arr_tbl_empty" => [ [ {} ] ], "arr_arr_tbl_val" => [ [ { "one" => bless( { "_file" => "(eval 228)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } ] ], "arr_arr_tbls" => [ [ { "one" => bless( { "_file" => "(eval 226)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, { "two" => bless( { "_file" => "(eval 227)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } ] ], "arr_tbl_tbl" => [ { "tbl" => { "one" => bless( { "_file" => "(eval 230)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } ], "tbl_arr_tbl" => { "arr_tbl" => [ { "one" => bless( { "_file" => "(eval 231)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } ] }, "tbl_tbl_empty" => { "tbl_0" => {} }, "tbl_tbl_val" => { "tbl_1" => { "one" => bless( { "_file" => "(eval 229)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/nest - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/nest - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/nest - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;bool.t100644001750001750 254014105470632 22503 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/bool.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "a" => 1, "b" => 0 } }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/bool - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/bool - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/bool - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;at-eof.toml100644001750001750 12514105470632 22507 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# This is a full-line comment key = "value" # This is a comment at the end of a line tricky.toml100644001750001750 60114105470632 22640 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment[section]#attached comment #[notsection] one = "11"#cmt two = "22#" three = '#' four = """# no comment # nor this #also not comment"""#is_comment five = 5.5#66 six = 6#7 8 = "eight" #nine = 99 ten = 10e2#1 eleven = 1.11e1#23 ["hash#tag"] "#!" = "hash bang" arr3 = [ "#", '#', """###""" ] arr4 = [ 1,# 9, 9, 2#,9 ,#9 3#] ,4] arr5 = [[[[#["#"], ["#"]]]]#] ] tbl1 = { "#" = '}#'}#}} exponent.toml100644001750001750 16214105470632 22640 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/floatlower = 3e2 upper = 3E2 neg = 3e-2 pos = 3E+2 zero = 3e0 pointlower = 3.1e2 pointupper = 3.1E2 minustenth = -1E-1 inf-and-nan.t100644001750001750 1760614105470632 22431 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/float/inf-and-nan.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "infinity" => bless( { "_file" => "(eval 181)", "_lines" => [ 6 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; 'Math::BigFloat'->new($_)->is_inf; }, "name" => "Math::BigFloat->new(\$_)->is_inf", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "infinity_neg" => bless( { "_file" => "(eval 180)", "_lines" => [ 6 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; 'Math::BigFloat'->new($_)->is_inf; }, "name" => "Math::BigFloat->new(\$_)->is_inf", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "infinity_plus" => bless( { "_file" => "(eval 184)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('+inf')->beq($got); }, "name" => "Math::BigFloat->new(\"+inf\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "nan" => bless( { "_file" => "(eval 183)", "_lines" => [ 6 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; 'Math::BigFloat'->new($_)->is_nan; }, "name" => "Math::BigFloat->new(\$_)->is_nan", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "nan_neg" => bless( { "_file" => "(eval 179)", "_lines" => [ 6 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; 'Math::BigFloat'->new($_)->is_nan; }, "name" => "Math::BigFloat->new(\$_)->is_nan", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "nan_plus" => bless( { "_file" => "(eval 182)", "_lines" => [ 6 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; 'Math::BigFloat'->new($_)->is_nan; }, "name" => "Math::BigFloat->new(\$_)->is_nan", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'float/inf-and-nan - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'float/inf-and-nan - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'float/inf-and-nan - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;nospaces.toml100644001750001750 1714105470632 22603 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arrayints = [1,2,3] control000755001750001750 014105470632 20666 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidmulti-lf.t100644001750001750 64714105470632 22733 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/multi-lf.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/multi-lf'; done_testing;multi-us.t100644001750001750 64714105470632 22761 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/multi-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/multi-us'; done_testing;open-bracket.t100644001750001750 64714105470632 22664 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/open-bracket.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/open-bracket'; done_testing;multiline.toml100644001750001750 2314105470632 22770 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key"""long key""" = 1 duplicate.toml100644001750001750 5714105470632 22747 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# DO NOT DO THIS name = "Tom" name = "Pradyun" no-secs.t100644001750001750 64714105470632 22665 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/datetime/no-secs.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on datetime/no-secs'; done_testing;no-t.toml100644001750001750 3314105470632 22650 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetimeno-t = 1987-07-0517:45:00Z float000755001750001750 014105470632 20313 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidleading-us.t100644001750001750 64714105470632 22657 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-us'; done_testing;with-pound.t100644001750001750 64714105470632 22707 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/with-pound.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/with-pound'; done_testing;whitespace.t100644001750001750 64714105470632 22745 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/whitespace.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/whitespace'; done_testing;llbrace.toml100644001750001750 1314105470632 22670 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[ [table]] rrbrace.toml100644001750001750 1314105470632 22704 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[[table] ] no-close-2.t100644001750001750 64714105470632 22516 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/no-close-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/no-close-2'; done_testing;implicit-groups.toml100644001750001750 2414105470632 22777 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid[a.b.c] answer = 42 case-sensitive.t100644001750001750 344314105470632 22722 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/case-sensitive.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "Section" => { "M" => "latin letter M", "name" => "different section!!", "\x{39c}" => "greek capital letter MU", "\x{3bc}" => "greek small letter mu" }, "sectioN" => "NN", "section" => { "NAME" => "upper", "Name" => "capitalized", "name" => "lower" } }; my $actual = from_toml($toml); is($actual, $expected1, 'key/case-sensitive - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/case-sensitive - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/case-sensitive - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;numeric-dotted.t100644001750001750 476014105470632 22726 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/numeric-dotted.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "1" => { "2" => bless( { "_file" => "(eval 283)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }; my $actual = from_toml($toml); is($actual, $expected1, 'key/numeric-dotted - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/numeric-dotted - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/numeric-dotted - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;equals-nospace.t100644001750001750 457614105470632 22730 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/key/equals-nospace.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer" => bless( { "_file" => "(eval 281)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'key/equals-nospace - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'key/equals-nospace - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'key/equals-nospace - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;quoted-dots.toml100644001750001750 16014105470632 22731 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/keyplain = 1 "with.dot" = 2 [plain_table] plain = 3 "with.dot" = 4 [table.withdot] plain = 5 "key.with.dots" = 6 array.t100644001750001750 346614105470632 22676 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/array.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "people" => [ { "first_name" => "Bruce", "last_name" => "Springsteen" }, { "first_name" => "Eric", "last_name" => "Clapton" }, { "first_name" => "Bob", "last_name" => "Seger" } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/array - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/array - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/array - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.t100644001750001750 1223514105470632 22730 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/empty.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "empty1" => {}, "empty2" => {}, "empty_in_array" => [ { "not_empty" => bless( { "_file" => "(eval 203)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, {} ], "empty_in_array2" => [ {}, { "not_empty" => bless( { "_file" => "(eval 202)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } ], "many_empty" => [ {}, {}, {} ], "nested_empty" => { "empty" => {} } }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/empty - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/empty - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/empty - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;at-eof2.toml100644001750001750 12514105470632 22571 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# This is a full-line comment key = "value" # This is a comment at the end of a line everywhere.t100644001750001750 1277114105470632 23063 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/comment/everywhere.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "group" => { "answer" => bless( { "_file" => "(eval 155)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d" => "1979-05-27T07:32:12-07:00", "more" => [ bless( { "_file" => "(eval 153)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 154)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] } }; my $actual = from_toml($toml); is($actual, $expected1, 'comment/everywhere - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'comment/everywhere - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'comment/everywhere - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;integer.toml100644001750001750 6514105470632 22747 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integeranswer = 42 posanswer = +42 neganswer = -42 zero = 0 underscore.t100644001750001750 663514105470632 23024 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/integer/underscore.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "kilo" => bless( { "_file" => "(eval 247)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1000')->beq($got); }, "name" => "Math::BigInt->new(\"1000\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "x" => bless( { "_file" => "(eval 248)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1111')->beq($got); }, "name" => "Math::BigInt->new(\"1111\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }; my $actual = from_toml($toml); is($actual, $expected1, 'integer/underscore - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'integer/underscore - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'integer/underscore - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array-one.toml100644001750001750 7214105470632 22637 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[[people]] first_name = "Bruce" last_name = "Springsteen" sub-empty.toml100644001750001750 1214105470632 22661 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[a] [a.b] hetergeneous.t100644001750001750 1446614105470632 23052 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/hetergeneous.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "mixed" => [ [ bless( { "_file" => "(eval 139)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 140)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], [ "a", "b" ], [ bless( { "_file" => "(eval 141)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('1.1')->beq($got); }, "name" => "Math::BigFloat->new(\"1.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 142)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('2.1')->beq($got); }, "name" => "Math::BigFloat->new(\"2.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/hetergeneous - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/hetergeneous - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/hetergeneous - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;string-lf.t100644001750001750 65114105470632 23102 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/string-lf.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/string-lf'; done_testing;multi-del.t100644001750001750 65114105470632 23071 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/multi-del.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/multi-del'; done_testing;string-us.t100644001750001750 65114105470632 23130 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/string-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/string-us'; done_testing;string-bs.t100644001750001750 65114105470632 23105 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/string-bs.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/string-bs'; done_testing;two-equals.toml100644001750001750 1114105470632 23064 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keykey= = 1 start-bracket.t100644001750001750 65114105470632 23053 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/start-bracket.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/start-bracket'; done_testing;no-leads.t100644001750001750 65114105470632 23013 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/datetime/no-leads.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on datetime/no-leads'; done_testing;bad-concat.t100644001750001750 65114105470632 23016 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-concat.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-concat'; done_testing;bad-escape.t100644001750001750 65114105470632 23007 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-escape.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-escape'; done_testing;integer000755001750001750 014105470632 20643 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invaliddouble-us.t100644001750001750 65114105470632 23051 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/double-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/double-us'; done_testing;utf16.toml100644001750001750 5214105470632 22733 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# UTF-16 without BOM exp-point-1.t100644001750001750 65114105470632 22703 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-point-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-point-1'; done_testing;exp-point-2.t100644001750001750 65114105470632 22704 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-point-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-point-2'; done_testing;trailing-us.t100644001750001750 65114105470632 23060 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/trailing-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/trailing-us'; done_testing;array-empty.t100644001750001750 65114105470632 23056 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/array-empty.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/array-empty'; done_testing;equals-sign.t100644001750001750 65114105470632 23034 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/equals-sign.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/equals-sign'; done_testing;redefine.toml100644001750001750 11614105470632 23071 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# Define b as int, and try to use it as a table: error [a] b = 1 [a.b] c = 2 no-close.toml100644001750001750 2714105470632 23037 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arraylong_array = [ 1, 2, 3 tables-2.toml100644001750001750 27414105470632 22755 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# INVALID TOML DOC [[fruit]] name = "apple" [[fruit.variety]] name = "red delicious" # This table conflicts with the previous table [fruit.variety] name = "granny smith" tables-1.toml100644001750001750 6714105470632 22734 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# INVALID TOML DOC fruit = [] [[fruit]] # Not allowed special-word.toml100644001750001750 11114105470632 23046 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/keyfalse = false true = 1 inf = 100000000 nan = "ceci n'est pas un nombre" local-time.t100644001750001750 252214105470632 23027 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/datetime/local-time.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "besttimeever" => "17:45:00", "milliseconds" => "10:32:00.555" }; my $actual = from_toml($toml); is($actual, $expected1, 'datetime/local-time - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'datetime/local-time - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'datetime/local-time - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;local-date.t100644001750001750 244214105470632 23007 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/datetime/local-date.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "bestdayever" => "1987-07-05" }; my $actual = from_toml($toml); is($actual, $expected1, 'datetime/local-date - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'datetime/local-date - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'datetime/local-date - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;literals.toml100644001750001750 22714105470632 23151 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integerbin1 = 0b11010110 bin2 = 0b1_0_1 oct1 = 0o01234567 oct2 = 0o755 oct3 = 0o7_6_5 hex1 = 0xDEADBEEF hex2 = 0xdeadbeef hex3 = 0xdead_beef hex4 = 0x00987 underscore.toml100644001750001750 7014105470632 23127 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/floatbefore = 3_141.5927 after = 3141.592_7 exponent = 3e1_4 without-super.t100644001750001750 275714105470632 23145 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/without-super.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "x" => { "y" => { "z" => { "w" => {} } } } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/without-super - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/without-super - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/without-super - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array-nest.toml100644001750001750 40614105470632 23050 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[[albums]] name = "Born to Run" [[albums.songs]] name = "Jungleland" [[albums.songs]] name = "Meeting Across the River" [[albums]] name = "Born in the USA" [[albums.songs]] name = "Glory Days" [[albums.songs]] name = "Dancing in the Dark" with-pound.toml100644001750001750 3214105470632 23034 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table["key#group"] answer = 42 whitespace.toml100644001750001750 1614105470632 23074 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table["valid key"] array-many.toml100644001750001750 24314105470632 23042 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[[people]] first_name = "Bruce" last_name = "Springsteen" [[people]] first_name = "Eric" last_name = "Clapton" [[people]] first_name = "Bob" last_name = "Seger" nested-double.t100644001750001750 1233014105470632 23073 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/nested-double.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "nest" => [ [ [ "a" ], [ bless( { "_file" => "(eval 147)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 148)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), [ bless( { "_file" => "(eval 149)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('3')->beq($got); }, "name" => "Math::BigInt->new(\"3\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] ] ] ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/nested-double - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/nested-double - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/nested-double - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;string-del.t100644001750001750 65314105470632 23247 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/string-del.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/string-del'; done_testing;multi-null.t100644001750001750 65314105470632 23301 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/multi-null.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/multi-null'; done_testing;comment-lf.t100644001750001750 65314105470632 23240 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/comment-lf.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/comment-lf'; done_testing;comment-us.t100644001750001750 65314105470632 23266 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/comment-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/comment-us'; done_testing;duplicate-keys.t100644001750001750 65314105470632 23232 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/duplicate-keys.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/duplicate-keys'; done_testing;after-array.toml100644001750001750 4014105470632 23202 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key[[agencies]] owner = "S Cjelli" two-equals2.toml100644001750001750 514105470632 23131 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keya==1 after-value.toml100644001750001750 6014105470632 23202 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keyfirst = "Tom" last = "Preston-Werner" # INVALID after-table.toml100644001750001750 4414105470632 23157 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key[error] this = "should not be here" partial-quoted.t100644001750001750 65314105470632 23242 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/partial-quoted.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/partial-quoted'; done_testing;two-equals3.toml100644001750001750 614105470632 23133 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keya=b=1 bad-uni-esc.t100644001750001750 65314105470632 23114 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-uni-esc.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-uni-esc'; done_testing;no-close.toml100644001750001750 5214105470632 23225 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringno-ending-quote = "One time, at band camp wrong-close.t100644001750001750 65314105470632 23264 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/wrong-close.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/wrong-close'; done_testing;inline-table000755001750001750 014105470632 21551 5ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalidempty.t100644001750001750 65314105470632 23220 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/empty.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/empty'; done_testing;mixed-case.toml100644001750001750 1614105470632 23152 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/boolvalid = False leading-us.t100644001750001750 65314105470632 23204 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-us'; done_testing;utf16-bom.t100644001750001750 65314105470632 23025 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/utf16-bom.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/utf16-bom'; done_testing;leading-zero.t100644001750001750 65314105470632 23204 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-zero.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-zero'; done_testing;duplicate.toml100644001750001750 2514105470632 23241 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[a] b = 1 [a] c = 2 special-chars.toml100644001750001750 5214105470632 23157 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key"~!@$^&*()_+-`1234567890[]|/?><.,;:'" = 1 datetime.toml100644001750001750 7214105470632 23243 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetimespace = 1987-07-05 17:45:00Z lower = 1987-07-05t17:45:00z timezone.toml100644001750001750 20614105470632 23320 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetimeutc = 1987-07-05T17:45:56Z pdt = 1987-07-05T17:45:56-05:00 nzst = 1987-07-05T17:45:56+12:00 nzdt = 1987-07-05T17:45:56+13:00 # DST escape-tricky.t100644001750001750 326014105470632 23256 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/escape-tricky.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "end_esc" => "String does not end here\" but ends here\\", "lit_end_esc" => "String ends here\\", "lit_multiline_end" => "There is no escape\\", "lit_multiline_not_unicode" => "\\u007f", "multiline_end_esc" => "When will it end? \"\"\"...\"\"\" should be here\"", "multiline_not_unicode" => "\\u0041", "multiline_unicode" => "\x{a0}" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/escape-tricky - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/escape-tricky - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/escape-tricky - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;raw-multiline.t100644001750001750 275214105470632 23311 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/raw-multiline.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "firstnl" => "This string has a ' quote character.", "multiline" => "This string\nhas ' a quote character\nand more than\none newline\nin it.", "oneline" => "This string has a ' quote character." }; my $actual = from_toml($toml); is($actual, $expected1, 'string/raw-multiline - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/raw-multiline - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/raw-multiline - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;with-pound.toml100644001750001750 16114105470632 23276 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringpound = "We see no # comments here." poundcomment = "But there are # some comments here." # Did I # mess you up? nest.toml100644001750001750 56414105470632 23215 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tabletbl_tbl_empty = { tbl_0 = {} } tbl_tbl_val = { tbl_1 = { one = 1 } } tbl_arr_tbl = { arr_tbl = [ { one = 1 } ] } arr_tbl_tbl = [ { tbl = { one = 1 } } ] # Array-of-array-of-table is interesting because it can only # be represented in inline form. arr_arr_tbl_empty = [ [ {} ] ] arr_arr_tbl_val = [ [ { one = 1 } ] ] arr_arr_tbls = [ [ { one = 1 }, { two = 2 } ] ] bool.toml100644001750001750 3214105470632 23145 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tablea = {a = true, b = false} inf-and-nan.toml100644001750001750 35014105470632 23065 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/float# We don't encode +nan and -nan back with the signs; many languages don't # support a sign on NaN (it doesn't really make much sense). nan = nan nan_neg = -nan nan_plus = +nan infinity = inf infinity_neg = -inf infinity_plus = +inf array-implicit.t100644001750001750 304214105470632 23220 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/array-implicit.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "albums" => { "songs" => [ { "name" => "Glory Days" } ] } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/array-implicit - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/array-implicit - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/array-implicit - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;comment-del.t100644001750001750 65514105470632 23405 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/comment-del.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/comment-del'; done_testing;string-null.t100644001750001750 65514105470632 23457 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/string-null.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/string-null'; done_testing;multi-lf.toml100644001750001750 2714105470632 23413 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlmulti-lf = """null""" rawmulti-lf.t100644001750001750 65514105470632 23444 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawmulti-lf.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawmulti-lf'; done_testing;rawmulti-us.t100644001750001750 65514105470632 23472 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawmulti-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawmulti-us'; done_testing;multi-us.toml100644001750001750 2714105470632 23441 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlmulti-us = """null""" without-value-2.t100644001750001750 65514105470632 23265 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/without-value-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/without-value-2'; done_testing;without-value-1.t100644001750001750 65514105470632 23264 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/without-value-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/without-value-1'; done_testing;open-bracket.toml100644001750001750 1114105470632 23335 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key[abc = 1 trailing-t.t100644001750001750 65514105470632 23367 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/datetime/trailing-t.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on datetime/trailing-t'; done_testing;no-secs.toml100644001750001750 3414105470632 23343 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetimeno-secs = 1987-07-05T17:45Z capital-bin.t100644001750001750 65514105470632 23341 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/capital-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/capital-bin'; done_testing;invalid-bin.t100644001750001750 65514105470632 23352 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/invalid-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/invalid-bin'; done_testing;trailing-us.t100644001750001750 65514105470632 23414 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/trailing-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/trailing-us'; done_testing;invalid-hex.t100644001750001750 65514105470632 23366 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/invalid-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/invalid-hex'; done_testing;invalid-oct.t100644001750001750 65514105470632 23367 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/invalid-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/invalid-oct'; done_testing;capital-oct.t100644001750001750 65514105470632 23356 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/capital-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/capital-oct'; done_testing;capital-hex.t100644001750001750 65514105470632 23355 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/capital-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/capital-hex'; done_testing;leading-us.toml100644001750001750 2214105470632 23332 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-us = _1.2 leading-point.t100644001750001750 65514105470632 23360 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-point.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-point'; done_testing;exp-double-us.t100644001750001750 65514105470632 23317 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-double-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-double-us'; done_testing;with-pound.toml100644001750001750 3014105470632 23361 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[key#group] answer = 42 whitespace.toml100644001750001750 1614105470632 23423 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[invalid key] no-close-2.toml100644001750001750 1214105470632 23170 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arrayx = [42 # text-in-array.t100644001750001750 65514105470632 23343 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/text-in-array.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/text-in-array'; done_testing;case-sensitive.toml100644001750001750 31314105470632 23403 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/keysectioN = "NN" [section] name = "lower" NAME = "upper" Name = "capitalized" [Section] name = "different section!!" "μ" = "greek small letter mu" "Μ" = "greek capital letter MU" M = "latin letter M" equals-nospace.toml100644001750001750 1214105470632 23355 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/keyanswer=42 numeric-dotted.toml100644001750001750 1014105470632 23356 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/key1.2 = 3 milliseconds.t100644001750001750 275014105470632 23471 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/datetime/milliseconds.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "utc1" => "1987-07-05T17:45:56.123456Z", "utc2" => "1987-07-05T17:45:56.600000Z", "wita1" => "1987-07-05T17:45:56.123456+08:00", "wita2" => "1987-07-05T17:45:56.600000+08:00" }; my $actual = from_toml($toml); is($actual, $expected1, 'datetime/milliseconds - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'datetime/milliseconds - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'datetime/milliseconds - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;escaped-escape.t100644001750001750 244014105470632 23354 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/escaped-escape.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer" => "\\x64" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/escaped-escape - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/escaped-escape - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/escaped-escape - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;unicode-escape.t100644001750001750 251214105470632 23376 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/unicode-escape.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer4" => "\x{3b4}", "answer8" => "\x{3b4}" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/unicode-escape - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/unicode-escape - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/unicode-escape - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;empty.toml100644001750001750 23514105470632 23375 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tableempty1 = {} empty2 = { } empty_in_array = [ { not_empty = 1 }, {} ] empty_in_array2 = [{},{not_empty=1}] many_empty = [{},{},{}] nested_empty = {"empty"={}} array.toml100644001750001750 25214105470632 23354 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tablepeople = [{first_name = "Bruce", last_name = "Springsteen"}, {first_name = "Eric", last_name = "Clapton"}, {first_name = "Bob", last_name = "Seger"}] everywhere.toml100644001750001750 105414105470632 23543 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/comment# Top comment. # Top comment. # Top comment. # [no-extraneous-groups-please] [group] # Comment answer = 42 # Comment # no-extraneous-keys-please = 999 # Inbetween comment. more = [ # Comment # What about multiple # comments? # Can you handle it? # # Evil. # Evil. 42, 42, # Comments within arrays are fun. # What about multiple # comments? # Can you handle it? # # Evil. # Evil. # ] Did I fool you? ] # Hopefully not. # Make sure the space between the datetime and "#" isn't lexed. d = 1979-05-27T07:32:12-07:00 # c underscore.toml100644001750001750 3114105470632 23454 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/integerkilo = 1_000 x = 1_1_1_1 mixed-int-float.t100644001750001750 774214105470632 23335 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/mixed-int-float.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "ints-and-floats" => [ bless( { "_file" => "(eval 144)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 145)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigFloat; my $got = 'Math::BigFloat'->new($_); 'Math::BigFloat'->new('1.1')->beq($got); }, "name" => "Math::BigFloat->new(\"1.1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/mixed-int-float - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/mixed-int-float - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/mixed-int-float - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;hetergeneous.toml100644001750001750 5114105470632 23463 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraymixed = [[1, 2], ["a", "b"], [1.1, 2.1]] mixed-int-array.t100644001750001750 544314105470632 23342 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/mixed-int-array.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "arrays-and-ints" => [ bless( { "_file" => "(eval 143)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), [ "Arrays are not integers." ] ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/mixed-int-array - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/mixed-int-array - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/mixed-int-array - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;rawstring-us.t100644001750001750 65714105470632 23650 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawstring-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawstring-us'; done_testing;comment-null.t100644001750001750 65714105470632 23615 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/comment-null.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/comment-null'; done_testing;multi-del.toml100644001750001750 3014105470632 23550 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlmulti-del = """null""" string-us.toml100644001750001750 2414105470632 23612 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlstring-us = "null" rawmulti-del.t100644001750001750 65714105470632 23611 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawmulti-del.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawmulti-del'; done_testing;rawstring-lf.t100644001750001750 65714105470632 23622 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawstring-lf.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawstring-lf'; done_testing;string-bs.toml100644001750001750 3114105470632 23565 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlstring-bs = "backspace" string-lf.toml100644001750001750 2414105470632 23564 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlstring-lf = "null" start-bracket.toml100644001750001750 2114105470632 23532 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key[a] [xyz = 5 [b] no-leads.toml100644001750001750 3714105470632 23501 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetimeno-leads = 1987-7-05T17:45:00Z bad-concat.toml100644001750001750 3514105470632 23502 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringno_concat = "first" "second" bad-codepoint.t100644001750001750 65714105470632 23541 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-codepoint.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-codepoint'; done_testing;bad-escape.toml100644001750001750 7614105470632 23500 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringinvalid-escape = "This string has a bad \a escape character." bad-multiline.t100644001750001750 65714105470632 23557 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-multiline.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-multiline'; done_testing;wrong-case-true.t100644001750001750 65714105470632 23500 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/bool# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/bool/wrong-case-true.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on bool/wrong-case-true'; done_testing;us-after-bin.t100644001750001750 65714105470632 23454 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/us-after-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/us-after-bin'; done_testing;negative-hex.t100644001750001750 65714105470632 23544 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/negative-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/negative-hex'; done_testing;negative-oct.t100644001750001750 65714105470632 23545 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/negative-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/negative-oct'; done_testing;positive-bin.t100644001750001750 65714105470632 23570 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/positive-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/positive-bin'; done_testing;negative-bin.t100644001750001750 65714105470632 23530 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/negative-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/negative-bin'; done_testing;double-us.toml100644001750001750 2214105470632 23531 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerdouble-us = 1__23 positive-hex.t100644001750001750 65714105470632 23604 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/positive-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/positive-hex'; done_testing;positive-oct.t100644001750001750 65714105470632 23605 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/positive-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/positive-oct'; done_testing;us-after-oct.t100644001750001750 65714105470632 23471 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/us-after-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/us-after-oct'; done_testing;us-after-hex.t100644001750001750 65714105470632 23470 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/us-after-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/us-after-hex'; done_testing;double-point-2.t100644001750001750 65714105470632 23370 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/double-point-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/double-point-2'; done_testing;exp-double-e-1.t100644001750001750 65714105470632 23254 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-double-e-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-double-e-1'; done_testing;double-point-1.t100644001750001750 65714105470632 23367 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/double-point-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/double-point-1'; done_testing;exp-double-e-2.t100644001750001750 65714105470632 23255 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-double-e-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-double-e-2'; done_testing;us-after-point.t100644001750001750 65714105470632 23505 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/us-after-point.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/us-after-point'; done_testing;inf_underscore.t100644001750001750 65714105470632 23635 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/inf_underscore.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/inf_underscore'; done_testing;exp-point-2.toml100644001750001750 2314105470632 23365 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-point-2 = 1.e2 nan_underscore.t100644001750001750 65714105470632 23635 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/nan_underscore.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/nan_underscore'; done_testing;trailing-point.t100644001750001750 65714105470632 23570 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/trailing-point.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/trailing-point'; done_testing;exp-leading-us.t100644001750001750 65714105470632 23452 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-leading-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-leading-us'; done_testing;trailing-us.toml100644001750001750 2314105470632 23541 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floattrailing-us = 1.2_ exp-point-1.toml100644001750001750 2414105470632 23365 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-point-1 = 1e2.3 array-empty.toml100644001750001750 3214105470632 23537 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[[]] name = "Born to Run" equals-sign.toml100644001750001750 1314105470632 23514 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[name=bad] array-implicit.t100644001750001750 65714105470632 23540 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/array-implicit.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/array-implicit'; done_testing;no-close-table.t100644001750001750 65714105470632 23445 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/no-close-table.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/no-close-table'; done_testing;spec-example-1-compact.t100644001750001750 2667414105470632 23410 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/spec-example-1-compact.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "clients" => { "data" => [ [ "gamma", "delta" ], [ bless( { "_file" => "(eval 304)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 305)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] ], "hosts" => [ "alpha", "omega" ] }, "database" => { "connection_max" => bless( { "_file" => "(eval 303)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('5000')->beq($got); }, "name" => "Math::BigInt->new(\"5000\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "enabled" => 1, "ports" => [ bless( { "_file" => "(eval 300)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8001')->beq($got); }, "name" => "Math::BigInt->new(\"8001\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 301)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8001')->beq($got); }, "name" => "Math::BigInt->new(\"8001\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), bless( { "_file" => "(eval 302)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('8002')->beq($got); }, "name" => "Math::BigInt->new(\"8002\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ], "server" => "192.168.1.1" }, "owner" => { "dob" => "1979-05-27T07:32:00-08:00", "name" => "Lance Uppercut" }, "servers" => { "alpha" => { "dc" => "eqdc10", "ip" => "10.0.0.1" }, "beta" => { "dc" => "eqdc10", "ip" => "10.0.0.2" } }, "title" => "TOML Example" }; my $actual = from_toml($toml); is($actual, $expected1, 'spec-example-1-compact - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'spec-example-1-compact - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'spec-example-1-compact - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;local-date.toml100644001750001750 3114105470632 23447 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetimebestdayever = 1987-07-05 local-time.toml100644001750001750 6414105470632 23476 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetimebesttimeever = 17:45:00 milliseconds = 10:32:00.555 unicode-literal.t100644001750001750 244614105470632 23600 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/unicode-literal.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "answer" => "\x{3b4}" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/unicode-literal - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/unicode-literal - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/unicode-literal - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;multiline.t100644001750001750 1037614105470632 23600 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/multiline.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "tbl_multiline" => { "a" => bless( { "_file" => "(eval 224)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "b" => "multiline\n", "c" => "and yet\nanother line", "d" => bless( { "_file" => "(eval 225)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('4')->beq($got); }, "name" => "Math::BigInt->new(\"4\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/multiline - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/multiline - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/multiline - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;without-super.toml100644001750001750 17014105470632 23620 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# [x] you # [x.y] don't # [x.y.z] need these [x.y.z.w] # for this to work [x] # defining a super-table afterwards is ok nested-double.toml100644001750001750 5014105470632 23517 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraynest = [ [ ["a"], [1, 2, [3]] ] ] mixed-int-string.t100644001750001750 532514105470632 23531 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/mixed-int-string.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "strings-and-ints" => [ "hi", bless( { "_file" => "(eval 146)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/mixed-int-string - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/mixed-int-string - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/mixed-int-string - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;comment-us.toml100644001750001750 3214105470632 23745 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlcomment-us = "ctrl-_" #  string-del.toml100644001750001750 2514105470632 23730 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlstring-del = "null" comment-lf.toml100644001750001750 3214105470632 23717 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlcomment-lf = "ctrl-P" #  multi-null.toml100644001750001750 3114105470632 23757 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlmulti-null = """null""" rawmulti-null.t100644001750001750 66114105470632 24012 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawmulti-null.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawmulti-null'; done_testing;rawstring-del.t100644001750001750 66114105470632 23760 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawstring-del.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawstring-del'; done_testing;special-character.t100644001750001750 66114105470632 23660 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/special-character.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/special-character'; done_testing;duplicate-keys.toml100644001750001750 3114105470632 23710 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keydupe = false dupe = true partial-quoted.toml100644001750001750 2414105470632 23722 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keypartial"quoted" = 5 wrong-close.toml100644001750001750 4714105470632 23751 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringbad-ending-quote = "double and single' bad-uni-esc.toml100644001750001750 1714105470632 23576 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringstr = "val\ue" missing-quotes.t100644001750001750 66114105470632 24013 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/missing-quotes.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/missing-quotes'; done_testing;empty.toml100644001750001750 1014105470632 23673 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-tablet = {,} no-comma.t100644001750001750 66114105470632 23567 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/no-comma.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/no-comma'; done_testing;wrong-case-false.t100644001750001750 66114105470632 23606 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/bool# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/bool/wrong-case-false.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on bool/wrong-case-false'; done_testing;leading-us.toml100644001750001750 2214105470632 23662 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-us = _123 utf16-bom.toml100644001750001750 4614105470632 23511 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encodingþÿ# UTF-16 with BOM us-before-point.t100644001750001750 66114105470632 23641 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/us-before-point.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/us-before-point'; done_testing;exp-trailing-us.t100644001750001750 66114105470632 23653 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/exp-trailing-us.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/exp-trailing-us'; done_testing;leading-zero.toml100644001750001750 2514105470632 23665 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-zero = 03.14 quoted-no-close.t100644001750001750 66114105470632 23623 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/quoted-no-close.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/quoted-no-close'; done_testing;raw-multiline.toml100644001750001750 30314105470632 23767 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringoneline = '''This string has a ' quote character.''' firstnl = ''' This string has a ' quote character.''' multiline = ''' This string has ' a quote character and more than one newline in it.''' escape-tricky.toml100644001750001750 51014105470632 23741 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringend_esc = "String does not end here\" but ends here\\" lit_end_esc = 'String ends here\' multiline_unicode = """ \u00a0""" multiline_not_unicode = """ \\u0041""" multiline_end_esc = """When will it end? \"""...""\" should be here\"""" lit_multiline_not_unicode = ''' \u007f''' lit_multiline_end = '''There is no escape\''' multiline-quotes.t100644001750001750 333514105470632 24036 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/multiline-quotes.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "lit_one" => "'one quote'", "lit_one_space" => " 'one quote' ", "lit_two" => "''two quotes''", "lit_two_space" => " ''two quotes'' ", "mismatch1" => "aaa'''bbb", "mismatch2" => "aaa\"\"\"bbb", "one" => "\"one quote\"", "one_space" => " \"one quote\" ", "two" => "\"\"two quotes\"\"", "two_space" => " \"\"two quotes\"\" " }; my $actual = from_toml($toml); is($actual, $expected1, 'string/multiline-quotes - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/multiline-quotes - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/multiline-quotes - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;key-dotted.t100644001750001750 7002614105470632 23645 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/key-dotted.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "a" => { "b" => bless( { "_file" => "(eval 222)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "arr" => [ { "T" => { "a" => { "b" => bless( { "_file" => "(eval 219)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "t" => { "a" => { "b" => bless( { "_file" => "(eval 218)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } }, { "T" => { "a" => { "b" => bless( { "_file" => "(eval 221)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "t" => { "a" => { "b" => bless( { "_file" => "(eval 220)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } ], "b" => { "a" => { "b" => bless( { "_file" => "(eval 223)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "c" => { "a" => { "b" => bless( { "_file" => "(eval 211)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "d" => { "a" => { "b" => bless( { "_file" => "(eval 210)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "e" => { "a" => { "b" => bless( { "_file" => "(eval 212)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "inline" => { "a" => { "b" => bless( { "_file" => "(eval 215)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "many" => { "dots" => { "here" => { "dot" => { "dot" => { "dot" => { "a" => { "b" => { "c" => bless( { "_file" => "(eval 213)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "d" => bless( { "_file" => "(eval 214)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } } } } } }, "tbl" => { "a" => { "b" => { "c" => { "d" => { "e" => bless( { "_file" => "(eval 217)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } }, "x" => { "a" => { "b" => { "c" => { "d" => { "e" => bless( { "_file" => "(eval 216)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } } } } }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/key-dotted - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/key-dotted - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/key-dotted - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;array-implicit.toml100644001750001750 4514105470632 23670 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[[albums.songs]] name = "Glory Days" array-table-array.t100644001750001750 356414105470632 23622 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/array-table-array.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => [ { "b" => [ { "c" => { "d" => "val0" } }, { "c" => { "d" => "val1" } } ] } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'table/array-table-array - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/array-table-array - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/array-table-array - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;string-with-comma.t100644001750001750 263514105470632 23701 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/string-with-comma.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "title" => [ "Client: XXXX, Job: XXXX", "Code: XXXX" ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/string-with-comma - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/string-with-comma - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/string-with-comma - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;rawmulti-lf.toml100644001750001750 3214105470632 24121 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawmulti-lf = '''null''' rawmulti-us.toml100644001750001750 3214105470632 24147 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawmulti-us = '''null''' string-null.toml100644001750001750 2614105470632 24137 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlstring-null = "null" rawstring-null.t100644001750001750 66314105470632 24170 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/control# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/control/rawstring-null.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on control/rawstring-null'; done_testing;comment-del.toml100644001750001750 3114105470632 24061 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlcomment-del = "0x7f" #  without-value-1.toml100644001750001750 414105470632 23720 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keykey without-value-2.toml100644001750001750 714105470632 23724 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keykey = trailing-t.toml100644001750001750 2014105470632 24041 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetimed = 2006-01-30T bad-byte-escape.t100644001750001750 66314105470632 23753 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-byte-escape.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-byte-escape'; done_testing;capital-bin.toml100644001750001750 2214105470632 24015 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integercapital-bin = 0B0 leading-zero-2.t100644001750001750 66314105470632 23674 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-zero-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-zero-2'; done_testing;capital-oct.toml100644001750001750 2214105470632 24032 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integercapital-oct = 0O0 leading-us-bin.t100644001750001750 66314105470632 23753 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-us-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-us-bin'; done_testing;leading-us-hex.t100644001750001750 66314105470632 23767 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-us-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-us-hex'; done_testing;invalid-oct.toml100644001750001750 2414105470632 24045 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerinvalid-oct = 0o778 leading-zero-1.t100644001750001750 66314105470632 23673 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-zero-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-zero-1'; done_testing;trailing-us.toml100644001750001750 2314105470632 24071 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integertrailing-us = 123_ invalid-hex.toml100644001750001750 2514105470632 24045 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerinvalid-hex = 0xaafz leading-us-oct.t100644001750001750 66314105470632 23770 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-us-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-us-oct'; done_testing;invalid-bin.toml100644001750001750 2514105470632 24031 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerinvalid-bin = 0b0012 capital-hex.toml100644001750001750 2214105470632 24031 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integercapital-hex = 0X1 leading-point.toml100644001750001750 2714105470632 24041 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-point = .12345 nan-incomplete-1.t100644001750001750 66314105470632 23674 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/nan-incomplete-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/nan-incomplete-1'; done_testing;nan-incomplete-3.t100644001750001750 66314105470632 23676 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/nan-incomplete-3.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/nan-incomplete-3'; done_testing;leading-zero-neg.t100644001750001750 66314105470632 23754 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-zero-neg.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-zero-neg'; done_testing;exp-double-us.toml100644001750001750 2714105470632 24000 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-double-us = 1e__23 inf-incomplete-1.t100644001750001750 66314105470632 23674 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/inf-incomplete-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/inf-incomplete-1'; done_testing;nan-incomplete-2.t100644001750001750 66314105470632 23675 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/nan-incomplete-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/nan-incomplete-2'; done_testing;inf-incomplete-3.t100644001750001750 66314105470632 23676 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/inf-incomplete-3.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/inf-incomplete-3'; done_testing;inf-incomplete-2.t100644001750001750 66314105470632 23675 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/inf-incomplete-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/inf-incomplete-2'; done_testing;text-after-table.t100644001750001750 66314105470632 23757 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/text-after-table.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/text-after-table'; done_testing;no-close-table-2.t100644001750001750 66314105470632 23601 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/no-close-table-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/no-close-table-2'; done_testing;text-in-array.toml100644001750001750 7014105470632 24022 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arrayarray = [ "Entry 1", I don't belong, "Entry 2", ] milliseconds.toml100644001750001750 22014105470632 24147 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/datetimeutc1 = 1987-07-05T17:45:56.123456Z utc2 = 1987-07-05T17:45:56.6Z wita1 = 1987-07-05T17:45:56.123456+08:00 wita2 = 1987-07-05T17:45:56.6+08:00 unicode-escape.toml100644001750001750 5214105470632 24043 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringanswer4 = "\u03B4" answer8 = "\U000003B4" escaped-escape.toml100644001750001750 2114105470632 24015 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringanswer = "\\x64" end-in-bool.t100644001750001750 273314105470632 23657 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/end-in-bool.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "black" => { "allow_prereleases" => 1, "python" => ">3.6", "version" => ">=18.9b0" } }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/end-in-bool - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/end-in-bool - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/end-in-bool - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;with-single-quotes.t100644001750001750 604714105470632 24052 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/with-single-quotes.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "b" => { "c" => { "answer" => bless( { "_file" => "(eval 308)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/with-single-quotes - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/with-single-quotes - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/with-single-quotes - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;mixed-string-table.t100644001750001750 324614105470632 24026 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/mixed-string-table.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "contributors" => [ "Foo Bar ", { "email" => "bazqux\@example.com", "name" => "Baz Qux", "url" => "https://example.com/bazqux" } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/mixed-string-table - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/mixed-string-table - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/mixed-string-table - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;string-quote-comma.t100644001750001750 264514105470632 24064 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/string-quote-comma.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "title" => [ "Client: \"XXXX\", Job: XXXX", "Code: XXXX" ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/string-quote-comma - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/string-quote-comma - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/string-quote-comma - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;mixed-int-float.toml100644001750001750 3314105470632 23767 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arrayints-and-floats = [1, 1.1] mixed-int-array.toml100644001750001750 6514105470632 24005 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arrayarrays-and-ints = [1, ["Arrays are not integers."]] rawstring-lf.toml100644001750001750 2714105470632 24301 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawstring-lf = 'null' rawmulti-del.toml100644001750001750 3314105470632 24265 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawmulti-del = '''null''' comment-null.toml100644001750001750 3214105470632 24270 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlcomment-null = "null" # rawstring-us.toml100644001750001750 2714105470632 24327 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawstring-us = 'null' single-open-bracket.t100644001750001750 66514105470632 24143 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/single-open-bracket.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/single-open-bracket'; done_testing;bad-slash-escape.t100644001750001750 66514105470632 24124 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/bad-slash-escape.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/bad-slash-escape'; done_testing;bad-codepoint.toml100644001750001750 12114105470632 24233 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringinvalid-codepoint = "This string contains a non scalar unicode codepoint \uD801" bad-multiline.toml100644001750001750 4114105470632 24232 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringmulti = "first line second line" wrong-case-true.toml100644001750001750 1114105470632 24150 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/boola = TRUE us-after-hex.toml100644001750001750 2414105470632 24144 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerus-after-hex = 0x_1 negative-oct.toml100644001750001750 2514105470632 24222 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integernegative-oct = -0o99 positive-oct.toml100644001750001750 2514105470632 24262 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerpositive-oct = +0o99 negative-hex.toml100644001750001750 2514105470632 24221 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integernegative-hex = -0xff trailing-us-oct.t100644001750001750 66514105470632 24200 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/trailing-us-oct.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/trailing-us-oct'; done_testing;us-after-bin.toml100644001750001750 2414105470632 24130 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerus-after-bin = 0b_1 trailing-us-hex.t100644001750001750 66514105470632 24177 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/trailing-us-hex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/trailing-us-hex'; done_testing;double-sign-nex.t100644001750001750 66514105470632 24157 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/double-sign-nex.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/double-sign-nex'; done_testing;positive-bin.toml100644001750001750 3314105470632 24244 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerpositive-bin = +0b11010110 positive-hex.toml100644001750001750 2514105470632 24261 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerpositive-hex = +0xff trailing-us-bin.t100644001750001750 66514105470632 24163 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/trailing-us-bin.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/trailing-us-bin'; done_testing;us-after-oct.toml100644001750001750 2414105470632 24145 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerus-after-oct = 0o_1 negative-bin.toml100644001750001750 3314105470632 24204 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integernegative-bin = -0b11010110 us-after-point.toml100644001750001750 2614105470632 24163 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatus-after-point = 1._2 exp-leading-us.toml100644001750001750 2714105470632 24131 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-leading-us = 1e_23 exp-double-e-2.toml100644001750001750 2714105470632 23734 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-double-e-2 = 1e2e3 inf_underscore.toml100644001750001750 2614105470632 24313 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatinf_underscore = in_f double-point-2.toml100644001750001750 2714105470632 24047 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatdouble-point-2 = 0.1.2 double-point-1.toml100644001750001750 2614105470632 24045 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatdouble-point-1 = 0..1 leading-point-neg.t100644001750001750 66514105470632 24130 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-point-neg.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-point-neg'; done_testing;exp-double-e-1.toml100644001750001750 2614105470632 23732 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-double-e-1 = 1ee2 trailing-point.toml100644001750001750 2414105470632 24244 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floattrailing-point = 1. nan_underscore.toml100644001750001750 2614105470632 24313 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatnan_underscore = na_n leading-zero-plus.t100644001750001750 66514105470632 24170 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-zero-plus.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-zero-plus'; done_testing;array-implicit.toml100644001750001750 115614105470632 24263 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# This test is a bit tricky. It should fail because the first use of # `[[albums.songs]]` without first declaring `albums` implies that `albums` # must be a table. The alternative would be quite weird. Namely, it wouldn't # comply with the TOML spec: "Each double-bracketed sub-table will belong to # the most *recently* defined table element *above* it." # # This is in contrast to the *valid* test, table-array-implicit where # `[[albums.songs]]` works by itself, so long as `[[albums]]` isn't declared # later. (Although, `[albums]` could be.) [[albums.songs]] name = "Glory Days" [[albums]] name = "Born in the USA" no-close-table.toml100644001750001750 2014105470632 24115 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arrayx = [{ key = 42 missing-separator.t100644001750001750 66514105470632 24307 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/missing-separator.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/missing-separator'; done_testing;spec-example-1-compact.toml100644001750001750 57014105470632 24043 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid#Useless spaces eliminated. title="TOML Example" [owner] name="Lance Uppercut" dob=1979-05-27T07:32:00-08:00#First class dates [database] server="192.168.1.1" ports=[8001,8001,8002] connection_max=5000 enabled=true [servers] [servers.alpha] ip="10.0.0.1" dc="eqdc10" [servers.beta] ip="10.0.0.2" dc="eqdc10" [clients] data=[["gamma","delta"],[1,2]] hosts=[ "alpha", "omega" ] unicode-literal.toml100644001750001750 1614105470632 24237 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringanswer = "δ" multiline.toml100644001750001750 13014105470632 24233 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tabletbl_multiline = { a = 1, b = """ multiline """, c = """and yet another line""", d = 4 } inline-table.t100644001750001750 2334314105470632 24137 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/inline-table/inline-table.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "name" => { "first" => "Tom", "last" => "Preston-Werner" }, "point" => { "x" => bless( { "_file" => "(eval 207)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ), "y" => bless( { "_file" => "(eval 208)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, "simple" => { "a" => bless( { "_file" => "(eval 209)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, "str-key" => { "a" => bless( { "_file" => "(eval 204)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, "table-array" => [ { "a" => bless( { "_file" => "(eval 205)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('1')->beq($got); }, "name" => "Math::BigInt->new(\"1\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) }, { "b" => bless( { "_file" => "(eval 206)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('2')->beq($got); }, "name" => "Math::BigInt->new(\"2\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'inline-table/inline-table - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'inline-table/inline-table - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'inline-table/inline-table - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;with-literal-string.t100644001750001750 617714105470632 24217 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/table/with-literal-string.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "\"b\"" => { "c" => { "answer" => bless( { "_file" => "(eval 306)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } } } }; my $actual = from_toml($toml); is($actual, $expected1, 'table/with-literal-string - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'table/with-literal-string - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'table/with-literal-string - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;nested-inline-table.t100644001750001750 262514105470632 24152 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/nested-inline-table.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => [ { "b" => {} } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/nested-inline-table - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/nested-inline-table - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/nested-inline-table - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;mixed-int-string.toml100644001750001750 3614105470632 24173 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraystrings-and-ints = ["hi", 42] rawmulti-null.toml100644001750001750 3414105470632 24474 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawmulti-null = '''null''' rawstring-del.toml100644001750001750 3014105470632 24436 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawstring-del = 'null' special-character.toml100644001750001750 3514105470632 24343 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keyμ = "greek small letter mu" impossible-date.t100644001750001750 66714105470632 24401 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/datetime/impossible-date.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on datetime/impossible-date'; done_testing;text-after-string.t100644001750001750 66714105470632 24421 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/text-after-string.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/text-after-string'; done_testing;missing-quotes.toml100644001750001750 1514105470632 24474 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringname = value linebreak-4.t100644001750001750 66714105470632 24164 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/linebreak-4.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/linebreak-4'; done_testing;no-comma.toml100644001750001750 2214105470632 24246 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-tablet = {x = 3 y = 4} linebreak-2.t100644001750001750 66714105470632 24162 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/linebreak-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/linebreak-2'; done_testing;linebreak-3.t100644001750001750 66714105470632 24163 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/linebreak-3.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/linebreak-3'; done_testing;linebreak-1.t100644001750001750 66714105470632 24161 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/linebreak-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/linebreak-1'; done_testing;wrong-case-false.toml100644001750001750 1214105470632 24264 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/boolb = FALSE double-sign-plus.t100644001750001750 66714105470632 24352 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/double-sign-plus.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/double-sign-plus'; done_testing;bad-utf8-at-end.t100644001750001750 66714105470632 24072 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/bad-utf8-at-end.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/bad-utf8-at-end'; done_testing;exp-trailing-us.toml100644001750001750 3114105470632 24332 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatexp-trailing-us = 1e_23_ leading-point-plus.t100644001750001750 66714105470632 24344 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/leading-point-plus.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/leading-point-plus'; done_testing;us-before-point.toml100644001750001750 2714105470632 24325 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatus-before-point = 1_.2 trailing-point-min.t100644001750001750 66714105470632 24352 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/trailing-point-min.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/trailing-point-min'; done_testing;quoted-no-close.toml100644001750001750 4214105470632 24304 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table["where will it end] name = value double-quote-escape.t100644001750001750 246414105470632 24363 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/string/double-quote-escape.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "test" => "\"one\"" }; my $actual = from_toml($toml); is($actual, $expected1, 'string/double-quote-escape - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'string/double-quote-escape - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'string/double-quote-escape - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;multiline-quotes.toml100644001750001750 70014105470632 24517 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/string# Make sure that quotes inside multiline strings are allowed, including right # after the opening '''/""" and before the closing '''/""" lit_one = ''''one quote'''' lit_two = '''''two quotes''''' lit_one_space = ''' 'one quote' ''' lit_two_space = ''' ''two quotes'' ''' one = """"one quote"""" two = """""two quotes""""" one_space = """ "one quote" """ two_space = """ ""two quotes"" """ mismatch1 = """aaa'''bbb""" mismatch2 = '''aaa"""bbb''' key-dotted.toml100644001750001750 46414105470632 24314 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tableinline = {a.b = 42} many.dots.here.dot.dot.dot = {a.b.c = 1, a.b.d = 2} a = { a.b = 1 } b = { "a"."b" = 1 } c = { a . b = 1 } d = { 'a' . "b" = 1 } e = {a.b=1} [tbl] a.b.c = {d.e=1} [tbl.x] a.b.c = {d.e=1} [[arr]] t = {a.b=1} T = {a.b=1} [[arr]] t = {a.b=2} T = {a.b=2} array-table-array.toml100644001750001750 15414105470632 24302 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table[[a]] [[a.b]] [a.b.c] d = "val0" [[a.b]] [a.b.c] d = "val1" string-with-comma.toml100644001750001750 6414105470632 24343 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraytitle = [ "Client: XXXX, Job: XXXX", "Code: XXXX" ] string-quote-comma-2.t100644001750001750 255514105470632 24223 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/string-quote-comma-2.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "title" => [ " \", " ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/string-quote-comma-2 - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/string-quote-comma-2 - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/string-quote-comma-2 - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;rawstring-null.toml100644001750001750 3114105470632 24645 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/controlrawstring-null = 'null' dotted-redefine-table.t100644001750001750 67114105470632 24436 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/dotted-redefine-table.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/dotted-redefine-table'; done_testing;multiline-quotes-1.t100644001750001750 67114105470632 24503 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/multiline-quotes-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/multiline-quotes-1'; done_testing;basic-byte-escapes.t100644001750001750 67114105470632 24470 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-byte-escapes.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-byte-escapes'; done_testing;bad-byte-escape.toml100644001750001750 2114105470632 24427 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringnaughty = "\xAg" multiline-no-close.t100644001750001750 67114105470632 24544 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/multiline-no-close.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/multiline-no-close'; done_testing;multiline-quotes-2.t100644001750001750 67114105470632 24504 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/multiline-quotes-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/multiline-quotes-2'; done_testing;double-comma.t100644001750001750 67114105470632 24426 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/double-comma.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/double-comma'; done_testing;leading-us-bin.toml100644001750001750 2614105470632 24434 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-us-bin = _0o1 leading-us-oct.toml100644001750001750 2614105470632 24451 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-us-oct = _0o1 leading-zero-1.toml100644001750001750 2414105470632 24352 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-zero-1 = 01 leading-us-hex.toml100644001750001750 2614105470632 24450 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-us-hex = _0o1 leading-zero-2.toml100644001750001750 2414105470632 24353 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-zero-2 = 00 nan-incomplete-2.toml100644001750001750 2714105470632 24357 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatnan-incomplete-2 = +na inf-incomplete-2.toml100644001750001750 2714105470632 24357 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatinf-incomplete-2 = +in nan-incomplete-3.toml100644001750001750 2714105470632 24360 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatnan-incomplete-3 = -na leading-zero-neg.toml100644001750001750 3214105470632 24432 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-zero-neg = -03.14 nan-incomplete-1.toml100644001750001750 2614105470632 24355 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatnan-incomplete-1 = na trailing-point-plus.t100644001750001750 67114105470632 24545 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/float# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/float/trailing-point-plus.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on float/trailing-point-plus'; done_testing;inf-incomplete-1.toml100644001750001750 2614105470632 24355 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatinf-incomplete-1 = in inf-incomplete-3.toml100644001750001750 2714105470632 24360 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatinf-incomplete-3 = -in text-after-table.toml100644001750001750 3714105470632 24442 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[error] this shouldn't be here duplicate-key-table.t100644001750001750 67114105470632 24433 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/duplicate-key-table.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/duplicate-key-table'; done_testing;no-close-table-2.toml100644001750001750 2214105470632 24256 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arrayx = [{ key = 42 # implicit-and-explicit-after.t100644001750001750 1053214105470632 24515 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/implicit-and-explicit-after.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "b" => { "c" => { "answer" => bless( { "_file" => "(eval 198)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "better" => bless( { "_file" => "(eval 197)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('43')->beq($got); }, "name" => "Math::BigInt->new(\"43\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }; my $actual = from_toml($toml); is($actual, $expected1, 'implicit-and-explicit-after - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'implicit-and-explicit-after - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'implicit-and-explicit-after - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;end-in-bool.toml100644001750001750 10614105470632 24337 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tableblack = { python=">3.6", version=">=18.9b0", allow_prereleases=true } with-single-quotes.toml100644001750001750 4514105470632 24512 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table['a'] [a.'b'] [a.'b'.c] answer = 42 mixed-string-table.toml100644001750001750 21314105470632 24505 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraycontributors = [ "Foo Bar ", { name = "Baz Qux", email = "bazqux@example.com", url = "https://example.com/bazqux" } ] string-quote-comma.toml100644001750001750 7014105470632 24522 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraytitle = [ "Client: \"XXXX\", Job: XXXX", "Code: XXXX" ] single-open-bracket.toml100644001750001750 214105470632 24574 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key[ bare-invalid-character.t100644001750001750 67314105470632 24600 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/key/bare-invalid-character.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on key/bare-invalid-character'; done_testing;bad-slash-escape.toml100644001750001750 7614105470632 24610 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringinvalid-escape = "This string has a bad \/ escape character." double-sign-nex.toml100644001750001750 2714105470632 24637 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerdouble-sign-nex = --99 text-after-integer.t100644001750001750 67314105470632 24674 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/text-after-integer.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/text-after-integer'; done_testing;trailing-us-hex.toml100644001750001750 2714105470632 24657 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integertrailing-us-hex = 0x1_ trailing-us-oct.toml100644001750001750 2714105470632 24660 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integertrailing-us-oct = 0o1_ trailing-us-bin.toml100644001750001750 2714105470632 24643 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integertrailing-us-bin = 0b1_ leading-point-neg.toml100644001750001750 3414105470632 24606 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-point-neg = -.12345 leading-zero-plus.toml100644001750001750 3314105470632 24645 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-zero-plus = +03.14 empty-implicit-table.t100644001750001750 67314105470632 24643 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/empty-implicit-table.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/empty-implicit-table'; done_testing;nested-brackets-open.t100644001750001750 67314105470632 24625 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/nested-brackets-open.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/nested-brackets-open'; done_testing;missing-separator.toml100644001750001750 2214105470632 24762 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arraywrong = [ 1 2 3 ] implicit-and-explicit-before.t100644001750001750 1053614105470632 24662 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/implicit-and-explicit-before.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "a" => { "b" => { "c" => { "answer" => bless( { "_file" => "(eval 200)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('42')->beq($got); }, "name" => "Math::BigInt->new(\"42\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }, "better" => bless( { "_file" => "(eval 199)", "_lines" => [ 7 ], "code" => sub { BEGIN {${^WARNING_BITS} = "\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x55\x15\x00\x04\x40\x05\x04\x50"} use strict; no feature ':all'; use feature ':5.16'; require Math::BigInt; my $got = 'Math::BigInt'->new($_); 'Math::BigInt'->new('43')->beq($got); }, "name" => "Math::BigInt->new(\"43\")->beq(\$_)", "operator" => "CODE(...)" }, 'Test2::Compare::Custom' ) } }; my $actual = from_toml($toml); is($actual, $expected1, 'implicit-and-explicit-before - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'implicit-and-explicit-before - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'implicit-and-explicit-before - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;inline-table.toml100644001750001750 23514105470632 24602 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/inline-tablename = { first = "Tom", last = "Preston-Werner" } point = { x = 1, y = 2 } simple = { a = 1 } str-key = { "a" = 1 } table-array = [{ "a" = 1 }, { "b" = 2 }] with-literal-string.toml100644001750001750 5114105470632 24650 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/table['a'] [a.'"b"'] [a.'"b"'.c] answer = 42 nested-inline-table.toml100644001750001750 2314105470632 24610 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraya = [ { b = {} } ] impossible-date.toml100644001750001750 3114105470632 25052 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetimed = 2006-01-50T00:00:00Z text-after-string.toml100644001750001750 5414105470632 25077 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringstring = "Is there life after strings?" No. basic-unknown-escape.t100644001750001750 67514105470632 25045 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-unknown-escape.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-unknown-escape'; done_testing;multiline-no-close-2.t100644001750001750 67514105470632 24707 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/multiline-no-close-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/multiline-no-close-2'; done_testing;linebreak-1.toml100644001750001750 15714105470632 24663 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# No newlines are allowed between the curly braces unless they are valid within # a value. simple = { a = 1 } linebreak-4.toml100644001750001750 11314105470632 24656 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-tablejson_like = { first = "Tom", last = "Preston-Werner" } linebreak-3.toml100644001750001750 1714105470632 24640 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-tablet = {a=1 ,b=2} trailing-comma.t100644001750001750 67514105470632 24771 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/inline-table/trailing-comma.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on inline-table/trailing-comma'; done_testing;linebreak-2.toml100644001750001750 1714105470632 24637 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-tablet = {a=1, b=2} leading-zero-sign-2.t100644001750001750 67514105470632 24635 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-zero-sign-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-zero-sign-2'; done_testing;double-sign-plus.toml100644001750001750 3014105470632 25022 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerdouble-sign-plus = ++99 leading-zero-sign-1.t100644001750001750 67514105470632 24634 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integer# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/integer/leading-zero-sign-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on integer/leading-zero-sign-1'; done_testing;bad-utf8-at-end.toml100644001750001750 36214105470632 24572 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# There is a 0xda at after the quotes, and no EOL at the end of the file. # # This is a bit of an edge case: This indicates there should be two bytes # (0b1101_1010) but there is no byte to follow because it's the end of the file. x = """"""Úbom-not-at-start-1.t100644001750001750 67514105470632 24557 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/bom-not-at-start-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/bom-not-at-start-1'; done_testing;bom-not-at-start-2.t100644001750001750 67514105470632 24560 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/bom-not-at-start-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/bom-not-at-start-2'; done_testing;bad-utf8-in-string.t100644001750001750 67514105470632 24633 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/bad-utf8-in-string.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/bad-utf8-in-string'; done_testing;leading-point-plus.toml100644001750001750 3514105470632 25021 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floatleading-point-plus = +.12345 trailing-point-min.toml100644001750001750 3114105470632 25023 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floattrailing-point-min = -1. array-missing-bracket.t100644001750001750 67514105470632 25010 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/array-missing-bracket.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/array-missing-bracket'; done_testing;duplicate-table-array.t100644001750001750 67514105470632 24765 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/duplicate-table-array.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/duplicate-table-array'; done_testing;nested-brackets-close.t100644001750001750 67514105470632 24773 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/nested-brackets-close.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/nested-brackets-close'; done_testing;double-quote-escape.toml100644001750001750 2114105470632 25016 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/stringtest = "\"one\"" string-quote-comma-2.toml100644001750001750 2414105470632 24660 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arraytitle = [ " \", ",] dotted-redefine-table.toml100644001750001750 11414105470632 25136 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/key# Defined a.b as int a.b = 1 # Tries to access it as table: error a.b.c = 2 no-leads-with-milli.t100644001750001750 67714105470632 25100 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetime# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/datetime/no-leads-with-milli.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on datetime/no-leads-with-milli'; done_testing;basic-byte-escapes.toml100644001750001750 2014105470632 25144 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringanswer = "\x33" multiline-quotes-2.toml100644001750001750 3014105470632 25161 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = """6 quotes: """""" multiline-no-close.toml100644001750001750 4114105470632 25223 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringinvalid = """ this will fail multiline-quotes-1.toml100644001750001750 3014105470632 25160 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = """6 quotes: """""" double-comma.toml100644001750001750 1714105470632 25110 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-tablet = {x=3,,y=4} bad-utf8-in-comment.t100644001750001750 67714105470632 24771 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/encoding/bad-utf8-in-comment.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on encoding/bad-utf8-in-comment'; done_testing;trailing-point-plus.toml100644001750001750 3214105470632 25224 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/floattrailing-point-plus = +1. duplicate-table-array2.t100644001750001750 67714105470632 25051 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/table/duplicate-table-array2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on table/duplicate-table-array2'; done_testing;duplicate-key-table.toml100644001750001750 6314105470632 25116 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[fruit] type = "apple" [fruit.type] apple = "yes" implicit-and-explicit-after.toml100644001750001750 4514105470632 25143 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid[a.b.c] answer = 42 [a] better = 43 bare-invalid-character.toml100644001750001750 1714105470632 25260 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/keybare!key = 123 multiline-escape-space.t100644001750001750 70114105470632 25350 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/multiline-escape-space.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/multiline-escape-space'; done_testing;basic-multiline-quotes.t100644001750001750 70114105470632 25416 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-multiline-quotes.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-multiline-quotes'; done_testing;text-after-integer.toml100644001750001750 4114105470632 25351 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integeranswer = 42 the ultimate answer? empty-implicit-table.toml100644001750001750 2314105470632 25320 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[naughty..naughty] nested-brackets-open.toml100644001750001750 1714105470632 25305 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[a[b] zyx = 42 implicit-and-explicit-before.toml100644001750001750 4514105470632 25304 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid[a] better = 43 [a.b.c] answer = 42 basic-unknown-escape.toml100644001750001750 1114105470632 25515 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = "\@" multiline-no-close-2.toml100644001750001750 614105470632 25343 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringx=""" trailing-comma.toml100644001750001750 21414105470632 25466 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/inline-table# A terminating comma (also called trailing comma) is not permitted after the # last key/value pair in an inline table abc = { abc = 123, } leading-zero-sign-2.toml100644001750001750 3214105470632 25310 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-zero-sign-2 = +01 leading-zero-sign-1.toml100644001750001750 3214105470632 25307 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/integerleading-zero-sign-1 = -01 bom-not-at-start-1.toml100644001750001750 2414105470632 25233 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encodingbom-not-at-start ÿý bom-not-at-start-2.toml100644001750001750 2514105470632 25235 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encodingbom-not-at-start= ÿý bad-utf8-in-string.toml100644001750001750 10314105470632 25325 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# The following line contains an invalid UTF-8 sequence. bad = "Ã" duplicate-table-array.toml100644001750001750 1614105470632 25442 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[tbl] [[tbl]] array-missing-bracket.toml100644001750001750 3714105470632 25470 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[[albums] name = "Born to Run" nested-brackets-close.toml100644001750001750 1714105470632 25451 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[a]b] zyx = 42 text-after-array-entries.t100644001750001750 70314105470632 25477 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/text-after-array-entries.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/text-after-array-entries'; done_testing;no-leads-with-milli.toml100644001750001750 4414105470632 25554 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/datetimewith-milli = 1987-07-5T17:45:00.12Z bad-utf8-in-comment.toml100644001750001750 414105470632 25421 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/encoding# à duplicate-table-array2.toml100644001750001750 1614105470632 25524 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/table[[tbl]] [tbl] multiline-escape-space.toml100644001750001750 3414105470632 26037 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = """ foo \ \n bar""" basic-multiline-quotes.toml100644001750001750 6214105470632 26106 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringstr5 = """Here are three quotation marks: """.""" table-array-string-backslash.t100644001750001750 272014105470632 25763 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use Data::Dumper; use Math::BigInt; use Math::BigFloat; use TOML::Tiny; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Useqq = 1; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/valid/array/table-array-string-backslash.toml" or die $!; binmode $fh, ':encoding(UTF-8)'; my $toml = do{ local $/; <$fh>; }; close $fh; my $expected1 = { "foo" => [ { "bar" => "\"{{baz}}\"" } ] }; my $actual = from_toml($toml); is($actual, $expected1, 'array/table-array-string-backslash - from_toml') or do{ diag 'TOML INPUT:'; diag "$toml"; diag ''; diag 'EXPECTED:'; diag Dumper($expected1); diag ''; diag 'ACTUAL:'; diag Dumper($actual); }; my $regenerated = to_toml $actual; my $reparsed = eval{ scalar from_toml $regenerated }; my $error = $@; ok(!$error, 'array/table-array-string-backslash - to_toml - no errors') or diag $error; is($reparsed, $expected1, 'array/table-array-string-backslash - to_toml') or do{ diag "ERROR: $error" if $error; diag ''; diag 'PARSED FROM TEST SOURCE TOML:'; diag Dumper($actual); diag ''; diag 'REGENERATED TOML:'; diag $regenerated; diag ''; diag 'REPARSED FROM REGENERATED TOML:'; diag Dumper($reparsed); }; done_testing;literal-multiline-quotes-1.t100644001750001750 71114105470632 26130 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/literal-multiline-quotes-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/literal-multiline-quotes-1'; done_testing;literal-multiline-quotes-2.t100644001750001750 71114105470632 26131 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/literal-multiline-quotes-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/literal-multiline-quotes-2'; done_testing;text-before-array-separator.t100644001750001750 71114105470632 26166 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/array# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/array/text-before-array-separator.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on array/text-before-array-separator'; done_testing;text-after-array-entries.toml100644001750001750 10614105470632 26204 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arrayarray = [ "Is there life after an array separator?", No "Entry" ] table-array-string-backslash.toml100644001750001750 3714105470632 26432 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/valid/arrayfoo = [ { bar="\"{{baz}}\""} ] literal-multiline-quotes-2.toml100644001750001750 5214105470632 26617 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = '''15 apostrophes: '''''''''''''''''' literal-multiline-quotes-1.toml100644001750001750 3614105470632 26620 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = '''6 apostrophes: '''''' text-before-array-separator.toml100644001750001750 10714105470632 26675 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/arrayarray = [ "Is there life before an array separator?" No, "Entry" ] basic-multiline-unknown-escape.t100644001750001750 72114105470632 27035 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-multiline-unknown-escape.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-multiline-unknown-escape'; done_testing;basic-multiline-unknown-escape.toml100644001750001750 1514105470632 27521 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = """\@""" basic-out-of-range-unicode-escape-2.t100644001750001750 73314105470632 27427 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-out-of-range-unicode-escape-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-out-of-range-unicode-escape-2'; done_testing;basic-out-of-range-unicode-escape-1.t100644001750001750 73314105470632 27426 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-out-of-range-unicode-escape-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-out-of-range-unicode-escape-1'; done_testing;basic-out-of-range-unicode-escape-1.toml100644001750001750 2114105470632 30104 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = "\UFFFFFFFF" basic-out-of-range-unicode-escape-2.toml100644001750001750 2114105470632 30105 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = "\U00D80000" basic-multiline-out-of-range-unicode-escape-2.t100644001750001750 75714105470632 31435 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-multiline-out-of-range-unicode-escape-2.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-multiline-out-of-range-unicode-escape-2'; done_testing;basic-multiline-out-of-range-unicode-escape-1.t100644001750001750 75714105470632 31434 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/string# File automatically generated from BurntSushi/toml-test use utf8; use Test2::V0; use TOML::Tiny; binmode STDIN, ':encoding(UTF-8)'; binmode STDOUT, ':encoding(UTF-8)'; open my $fh, '<', "./t/toml-test/invalid/string/basic-multiline-out-of-range-unicode-escape-1.toml" or die $!; binmode $fh, ':raw'; my $toml = do{ local $/; <$fh>; }; close $fh; ok dies(sub{ scalar from_toml($toml, strict => 1) }), 'strict_mode dies on string/basic-multiline-out-of-range-unicode-escape-1'; done_testing;basic-multiline-out-of-range-unicode-escape-2.toml100644001750001750 2514105470632 32111 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = """\U00D80000""" basic-multiline-out-of-range-unicode-escape-1.toml100644001750001750 2514105470632 32110 0ustar00sysreadsysread000000000000TOML-Tiny-0.15/t/toml-test/invalid/stringa = """\UFFFFFFFF"""