{"id":18981447,"url":"https://github.com/awncorp/data-object-data","last_synced_at":"2026-06-19T12:33:36.363Z","repository":{"id":77256371,"uuid":"300956882","full_name":"awncorp/data-object-data","owner":"awncorp","description":"Podish Parser for Perl 5","archived":false,"fork":false,"pushed_at":"2020-10-03T20:33:57.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-11T12:20:56.671Z","etag":null,"topics":["object-oriented","perl","perl5"],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/awncorp.png","metadata":{"files":{"readme":"README","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-03T19:04:44.000Z","updated_at":"2022-07-24T20:56:14.000Z","dependencies_parsed_at":"2023-02-23T17:15:45.199Z","dependency_job_id":null,"html_url":"https://github.com/awncorp/data-object-data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/awncorp/data-object-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awncorp","download_url":"https://codeload.github.com/awncorp/data-object-data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awncorp%2Fdata-object-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34532255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["object-oriented","perl","perl5"],"created_at":"2024-11-08T16:09:51.469Z","updated_at":"2026-06-19T12:33:36.329Z","avatar_url":"https://github.com/awncorp.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n\n    Data::Object::Data\n\nABSTRACT\n\n    Podish Parser for Perl 5\n\nSYNOPSIS\n\n      package main;\n    \n      use Data::Object::Data;\n    \n      my $data = Data::Object::Data-\u003enew(\n        file =\u003e 't/Data_Object_Data.t'\n      );\n\nDESCRIPTION\n\n    This package provides methods for parsing and extracting pod-like\n    sections from any file or package. The pod-like syntax allows for using\n    these sections anywhere in the source code and having Perl properly\n    ignoring them.\n\nSCENARIOS\n\n    This package supports the following scenarios:\n\n syntax\n\n      # POD\n    \n      # =head1 NAME\n      #\n      # Example #1\n      #\n      # =cut\n      #\n      # =head1 NAME\n      #\n      # Example #2\n      #\n      # =cut\n    \n      # Podish Syntax\n    \n      # =name\n      #\n      # Example #1\n      #\n      # =cut\n      #\n      # =name\n      #\n      # Example #2\n      #\n      # =cut\n    \n      # Podish Syntax (Nested)\n    \n      # =name\n      #\n      # Example #1\n      #\n      # +=head1 WHY?\n      #\n      # blah blah blah\n      #\n      # +=cut\n      #\n      # More information on the same topic as was previously mentioned in the\n      # previous section demonstrating the topic as-is obvious from said section\n      # ...\n      #\n      # =cut\n    \n      # Alternate Podish Syntax\n    \n      # @=name\n      #\n      # Example #1\n      #\n      # @=cut\n      #\n      # @=name\n      #\n      # Example #2\n      #\n      # @=cut\n    \n      my $data = Data::Object::Data-\u003enew(\n        file =\u003e 't/examples/alternate.pod'\n      );\n    \n      $data-\u003econtents('name');\n    \n      # [['Example #1'], ['Example #2']]\n\n    This package supports parsing standard POD and pod-like sections from\n    any file or package, anywhere in the document. Additionally, this\n    package supports an alternative POD definition syntax which helps\n    differentiate between the traditional POD usage and other usages.\n\nATTRIBUTES\n\n    This package has the following attributes:\n\n data\n\n      data(Str)\n\n    This attribute is read-only, accepts (Str) values, and is optional.\n\n file\n\n      file(Str)\n\n    This attribute is read-only, accepts (Str) values, and is optional.\n\n from\n\n      from(Str)\n\n    This attribute is read-only, accepts (Str) values, and is optional.\n\nMETHODS\n\n    This package implements the following methods:\n\n content\n\n      content(Str $name) : ArrayRef[Str]\n\n    The content method the pod-like section where the name matches the\n    given string.\n\n    content example #1\n\n        # =name\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/content.pod'\n        );\n      \n        $data-\u003econtent('name');\n      \n        # ['Example #1']\n\n    content example #2\n\n        # =name\n        #\n        # Example #1\n        #\n        # +=head1 WHY?\n        #\n        # blah blah blah\n        #\n        # +=cut\n        #\n        # More information on the same topic as was previously mentioned in the\n        # previous section demonstrating the topic as-is obvious from said section\n        # ...\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/nested.pod'\n        );\n      \n        $data-\u003econtent('name');\n      \n        # ['Example #1', '', '=head1 WHY?', ...]\n\n contents\n\n      contents(Str $list, Str $name) : ArrayRef[ArrayRef]\n\n    The contents method returns all pod-like sections that start with the\n    given string, e.g. pod matches =pod foo. This method returns an\n    arrayref of data for the matched sections. Optionally, you can filter\n    the results by name by providing an additional argument.\n\n    contents example #1\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name example-2\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/contents.pod'\n        );\n      \n        $data-\u003econtents('name');\n      \n       # [['Example #1'], ['Example #2']]\n\n    contents example #2\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # +=head1 WHY?\n        #\n        # blah blah blah\n        #\n        # +=cut\n        #\n        # ...\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          string =\u003e join \"\\n\\n\", (\n            '=name example-1',\n            '',\n            'Example #1',\n            '',\n            '+=head1 WHY?',\n            '',\n            'blah blah blah',\n            '',\n            '+=cut',\n            '',\n            'More information on the same topic as was previously mentioned in the',\n            '',\n            'previous section demonstrating the topic as-is obvious from said section',\n            '',\n            '...',\n            '',\n            '=cut'\n          )\n        );\n      \n        $data-\u003econtents('name');\n      \n        # [['Example #1', '', '=head1 WHY?', ...]]\n\n item\n\n      item(Str $name) : HashRef\n\n    The item method returns metadata for the pod-like section that matches\n    the given string.\n\n    item example #1\n\n        # =name\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/content.pod'\n        );\n      \n        $data-\u003eitem('name');\n      \n        # {\n        #   index =\u003e 1,\n        #   data =\u003e ['Example #1'],\n        #   list =\u003e undef,\n        #   name =\u003e 'name'\n        # }\n\n list\n\n      list(Str $name) : ArrayRef\n\n    The list method returns metadata for each pod-like section that matches\n    the given string.\n\n    list example #1\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name example-2\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/contents.pod'\n        );\n      \n        $data-\u003elist('name');\n      \n        # [{\n        #   index =\u003e 1,\n        #   data =\u003e ['Example #1'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-1'\n        # },\n        # {\n        #   index =\u003e 2,\n        #   data =\u003e ['Example #2'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-2'\n        # }]\n\n list_item\n\n      list_item(Str $list, Str $item) : ArrayRef[HashRef]\n\n    The list_item method returns metadata for the pod-like sections that\n    matches the given list name and argument.\n\n    list_item example #1\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name example-2\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/contents.pod'\n        );\n      \n        $data-\u003elist_item('name', 'example-2');\n      \n        # [{\n        #   index =\u003e 2,\n        #   data =\u003e ['Example #2'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-2'\n        # }]\n\n parser\n\n      parser(Str $string) : ArrayRef\n\n    The parser method extracts pod-like sections from a given string and\n    returns an arrayref of metadata.\n\n    parser example #1\n\n        # given: synopsis\n      \n        $data-\u003eparser(\"=pod\\n\\nContent\\n\\n=cut\");\n      \n        # [{\n        #   index =\u003e 1,\n        #   data =\u003e ['Content'],\n        #   list =\u003e undef,\n        #   name =\u003e 'pod'\n        # }]\n\n pluck\n\n      pluck(Str $type, Str $item) : ArrayRef[HashRef]\n\n    The pluck method splices and returns metadata for the pod-like section\n    that matches the given list or item by name. Splicing means that the\n    parsed dataset will be reduced each time this method returns data,\n    making this useful with iterators and reducers.\n\n    pluck example #1\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name example-2\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/contents.pod'\n        );\n      \n        $data-\u003epluck('list', 'name');\n      \n        # [{\n        #   index =\u003e 1,\n        #   data =\u003e ['Example #1'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-1'\n        # },{\n        #   index =\u003e 2,\n        #   data =\u003e ['Example #2'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-2'\n        # }]\n\n    pluck example #2\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name example-2\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/contents.pod'\n        );\n      \n        $data-\u003epluck('item', 'example-1');\n      \n        # [{\n        #   index =\u003e 1,\n        #   data =\u003e ['Example #1'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-1'\n        # }]\n      \n        $data-\u003epluck('item', 'example-2');\n      \n        # [{\n        #   index =\u003e 2,\n        #   data =\u003e ['Example #2'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-2'\n        # }]\n\n    pluck example #3\n\n        # =name example-1\n        #\n        # Example #1\n        #\n        # =cut\n        #\n        # =name example-2\n        #\n        # Example #2\n        #\n        # =cut\n      \n        my $data = Data::Object::Data-\u003enew(\n          file =\u003e 't/examples/contents.pod'\n        );\n      \n        $data-\u003epluck('list', 'name');\n      \n        # [{\n        #   index =\u003e 1,\n        #   data =\u003e ['Example #1'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-1'\n        # },{\n        #   index =\u003e 2,\n        #   data =\u003e ['Example #2'],\n        #   list =\u003e 'name',\n        #   name =\u003e 'example-2'\n        # }]\n      \n        $data-\u003epluck('list', 'name');\n      \n        # []\n\nAUTHOR\n\n    Al Newkirk, awncorp@cpan.org\n\nLICENSE\n\n    Copyright (C) 2011-2019, Al Newkirk, et al.\n\n    This is free software; you can redistribute it and/or modify it under\n    the terms of the The Apache License, Version 2.0, as elucidated in the\n    \"license file\"\n    \u003chttps://github.com/iamalnewkirk/data-object-data/blob/master/LICENSE\u003e.\n\nPROJECT\n\n    Wiki \u003chttps://github.com/iamalnewkirk/data-object-data/wiki\u003e\n\n    Project \u003chttps://github.com/iamalnewkirk/data-object-data\u003e\n\n    Initiatives \u003chttps://github.com/iamalnewkirk/data-object-data/projects\u003e\n\n    Milestones\n    \u003chttps://github.com/iamalnewkirk/data-object-data/milestones\u003e\n\n    Contributing\n    \u003chttps://github.com/iamalnewkirk/data-object-data/blob/master/CONTRIBUTE.md\u003e\n\n    Issues \u003chttps://github.com/iamalnewkirk/data-object-data/issues\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fdata-object-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawncorp%2Fdata-object-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawncorp%2Fdata-object-data/lists"}