{"id":15557713,"url":"https://github.com/fgasper/p5-toml-xs","last_synced_at":"2025-04-16T01:53:40.640Z","repository":{"id":56839913,"uuid":"357017768","full_name":"FGasper/p5-TOML-XS","owner":"FGasper","description":"CPAN’s TOML::XS","archived":false,"fork":false,"pushed_at":"2021-08-12T13:10:00.000Z","size":133,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T03:46:31.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"XS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FGasper.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-12T01:04:46.000Z","updated_at":"2023-12-19T22:19:26.000Z","dependencies_parsed_at":"2022-08-28T22:00:08.908Z","dependency_job_id":null,"html_url":"https://github.com/FGasper/p5-TOML-XS","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-TOML-XS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-TOML-XS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-TOML-XS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FGasper%2Fp5-TOML-XS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FGasper","download_url":"https://codeload.github.com/FGasper/p5-TOML-XS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183093,"owners_count":21226140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T15:20:26.851Z","updated_at":"2025-04-16T01:53:40.623Z","avatar_url":"https://github.com/FGasper.png","language":"XS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nTOML::XS - Turbo-charged [TOML](https://toml.io) parsing!\n\n\u003cdiv\u003e\n    \u003ca href='https://coveralls.io/github/FGasper/p5-TOML-XS?branch=master'\u003e\u003cimg src='https://coveralls.io/repos/github/FGasper/p5-TOML-XS/badge.svg?branch=master' alt='Coverage Status' /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# SYNOPSIS\n\n    # NB: Don’t read_text(), or stuff may break.\n    my $toml = File::Slurper::read_binary('/path/to/toml/file');\n\n    my $struct = TOML::XS::from_toml($toml)-\u003eto_struct();\n\n# DESCRIPTION\n\nThis module facilitates parsing of TOML documents in Perl via XS,\nwhich can yield dramatic performance gains relative to pure-Perl TOML\nlibraries.\n\nIt is currently implemented as a wrapper around the\n[tomlc99](https://github.com/cktan/tomlc99) C library.\n\n# FUNCTIONS\n\n## $doc = TOML::XS::from\\_toml($byte\\_string)\n\nConverts a byte string (i.e., raw, undecoded bytes) that contains a\nserialized TOML document to a [TOML::XS::Document](https://metacpan.org/pod/TOML::XS::Document) instance.\n\nThrows a suitable exception if the TOML document is unparseable. This\ndoesn’t necessarily mean that _any_ malformed TOML content triggers such\nan error; for example, if an individual data item is malformed but the\ndocument is otherwise valid, this may return successful.\n\n# MAPPING TOML TO PERL\n\nMost TOML data items map naturally to Perl. The following details\nare relevant:\n\n- Strings are character-decoded.\n- Booleans are represented as [TOML::XS::true](https://metacpan.org/pod/TOML::XS::true) and [TOML::XS::false](https://metacpan.org/pod/TOML::XS::false),\nwhich are namespace aliases for the relevant constants from\n[Types::Serialiser](https://metacpan.org/pod/Types::Serialiser).\n- Timestamps are represented as [TOML::XS::Timestamp](https://metacpan.org/pod/TOML::XS::Timestamp) instances.\n\n# NOTE ON CHARACTER DECODING\n\nThis library mimics the default behaviour of popular JSON modules:\nthe TOML input to the parser is expected to be a byte string, while the\nstrings that the parser outputs are character strings.\n\n# PERFORMANCE\n\nOn my system the included (_very_ simple!) benchmark outputs:\n\n    Including TOML::Tiny …\n\n    small …\n                Rate toml_tiny   toml_xs\n    toml_tiny  1009/s        --      -95%\n    toml_xs   21721/s     2053%        --\n\n    large …\n                (warning: too few iterations for a reliable count)\n              s/iter toml_tiny   toml_xs\n    toml_tiny   1.65        --      -93%\n    toml_xs    0.110     1400%        --\n\n# COPYRIGHT \u0026 LICENSE\n\nCopyright 2021 Gasper Software Consulting. All rights reserved.\n\nThis library is licensed under the same license as Perl itself.\n\n[tomlc99](https://github.com/cktan/tomlc99) is licensed under the\n[MIT License](https://mit-license.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgasper%2Fp5-toml-xs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgasper%2Fp5-toml-xs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgasper%2Fp5-toml-xs/lists"}