{"id":32215977,"url":"https://github.com/marcspec/marc-spec","last_synced_at":"2025-10-22T07:54:40.713Z","repository":{"id":56839853,"uuid":"43110457","full_name":"MARCspec/MARC-Spec","owner":"MARCspec","description":"MARCspec parser and validator for Perl","archived":false,"fork":false,"pushed_at":"2017-12-16T08:28:58.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-22T07:54:39.921Z","etag":null,"topics":["catmandu","library","marc","marcspec","reference-implementation"],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/MARC::Spec","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/MARCspec.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":"2015-09-25T04:56:07.000Z","updated_at":"2017-12-13T06:23:10.000Z","dependencies_parsed_at":"2022-08-29T05:00:39.865Z","dependency_job_id":null,"html_url":"https://github.com/MARCspec/MARC-Spec","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/MARCspec/MARC-Spec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MARCspec%2FMARC-Spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MARCspec%2FMARC-Spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MARCspec%2FMARC-Spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MARCspec%2FMARC-Spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MARCspec","download_url":"https://codeload.github.com/MARCspec/MARC-Spec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MARCspec%2FMARC-Spec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280402183,"owners_count":26324587,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"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":["catmandu","library","marc","marcspec","reference-implementation"],"created_at":"2025-10-22T07:54:38.555Z","updated_at":"2025-10-22T07:54:40.698Z","avatar_url":"https://github.com/MARCspec.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nMARC::Spec - A MARCspec parser and builder\n\n# SYNOPSIS\n\n    use MARC::Spec;\n    \n    # Parsing MARCspec from a string\n    my $ms = MARC::Spec::parse('246[0-1]$f{245$h~\\[microform\\]|245$h~\\microfilm}');\n\n    # Structure\n    say ref $ms;                                             # MARC::Spec\n    say ref $ms-\u003efield;                                      # MARC::Spec::Field\n    say ref $ms-\u003esubfields;                                  # ARRAY\n    say ref $ms-\u003esubfields-\u003e[0];                             # MARC::Spec::Subfield\n    say ref $ms-\u003esubfields-\u003e[0]-\u003esubspecs;                   # ARRAY\n    say ref $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0];              # ARRAY\n    say ref $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[1];         # MARC::Spec::Subspec\n    say ref $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[1]-\u003eleft;   # MARC::Spec\n    say ref $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[1]-\u003eright;  # MARC::Spec::Comparisonstring\n\n    # Access to attributes\n    say $ms-\u003efield-\u003ebase;                                                    # 246[0-1]\n    say $ms-\u003efield-\u003etag;                                                     # 246\n    say $ms-\u003efield-\u003eindex_start;                                             # 0\n    say $ms-\u003efield-\u003eindex_end;                                               # 1\n    say $ms-\u003efield-\u003eindex_length;                                            # 2\n    say $ms-\u003esubfields-\u003e[0]-\u003ebase;                                           # 'f[0-#]'\n    say $ms-\u003esubfields-\u003e[0]-\u003ecode;                                           # 'f'\n    say $ms-\u003esubfields-\u003e[0]-\u003eindex_start;                                    # 0\n    say $ms-\u003esubfields-\u003e[0]-\u003eindex_end;                                      # '#'\n    say $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[0]-\u003esubterms;                   # '245$h~\\[microform\\]'\n    say $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[0]-\u003eleft-\u003efield-\u003etag;           # 245\n    say $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[0]-\u003eleft-\u003efield-\u003eindex_length;  # -1\n    say $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[0]-\u003eleft-\u003esubfields-\u003e[0]-\u003ecode; # 'h'\n    say $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[0]-\u003eright-\u003ecomparable;          # '[microform]'\n    say $ms-\u003esubfields-\u003e[0]-\u003esubspecs-\u003e[0]-\u003e[1]-\u003eright-\u003ecomparable;          # 'microfilm'\n    \n    # creating MARCspec from scratch\n    my $field    =  MARC::Spec::Field-\u003enew('245');\n    my $subfield = MARC::Spec::Subfield-\u003enew('a');\n    my $spec     = MARC::Spec-\u003enew($field);\n    $spec-\u003eadd_subfield($subfield);\n\n# DESCRIPTION\n\nMARC::Spec is a [MARCspec - A common MARC record path language](http://marcspec.github.io/MARCspec/) parser and builder.\n\n# FUNCTIONS\n\n## parse(Str)\n\nParses a MARCspec as string and returns an instance of MARC::Spec.\n\n# METHODS\n\n## new(MARC::Spec::Field)\n\nCreate a new MARC::Spec instance. Parameter must be an instance of [MARC::Spec::Field](https://metacpan.org/pod/MARC::Spec::Field).\n\n## add\\_subfield(MARC::Spec::Subfield)\n\nAppends a subfield to the array of the attribute subfields. Parameter must be an instance of \n[MARC::Spec::Subfield](https://metacpan.org/pod/MARC::Spec::Subfield).\n\n## add\\_subfields(ArrayRef\\[MARC::Spec::Subfield\\])\n\nAppends subfields to the array of the attribute subfields. Parameter must be an ArrayRef and \nelements must be instances of [MARC::Spec::Subfield](https://metacpan.org/pod/MARC::Spec::Subfield). \n\n# PREDICATES\n\n## has\\_subfields\n\nReturns true if attribute subfields has an value and false otherwise.\n\n## has\\_indicator\n\nReturns true if attribute indicator has an value and false otherwise.\n\n# ATTRIBUTES\n\n## field\n\nObligatory. Attribute field is an instance of [MARC::Spec::Field](https://metacpan.org/pod/MARC::Spec::Field).\n\n## subfields\n\nIf defined, subfields is an array of instances of [MARC::Spec::Subfield](https://metacpan.org/pod/MARC::Spec::Subfield).\n\n## indicator\n\nIf defined, indicator is an instance of [MARC::Spec::Indicator](https://metacpan.org/pod/MARC::Spec::Indicator).\n\n# AUTHOR\n\nCarsten Klee `\u003cklee at cpan.org\u003e`\n\n# CONTRIBUTORS\n\n- Johann Rolschewski, `\u003cjorol at cpan\u003e`\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2016 by Carsten Klee.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n\n# BUGS\n\nPlease report any bugs to [https://github.com/MARCspec/MARC-Spec/issues](https://github.com/MARCspec/MARC-Spec/issues)\n\n# SEE ALSO\n\n- [MARC::Spec::Field](https://metacpan.org/pod/MARC::Spec::Field)\n- [MARC::Spec::Subfield](https://metacpan.org/pod/MARC::Spec::Subfield)\n- [MARC::Spec::Indicator](https://metacpan.org/pod/MARC::Spec::Indicator)\n- [MARC::Spec::Subspec](https://metacpan.org/pod/MARC::Spec::Subspec)\n- [MARC::Spec::Structure](https://metacpan.org/pod/MARC::Spec::Structure)\n- [MARC::Spec::Comparisonstring](https://metacpan.org/pod/MARC::Spec::Comparisonstring)\n- [MARC::Spec::Parser](https://metacpan.org/pod/MARC::Spec::Parser)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcspec%2Fmarc-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcspec%2Fmarc-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcspec%2Fmarc-spec/lists"}