{"id":18909966,"url":"https://github.com/jonasbn/perl-critic-policy-logiclab-requireversionformat","last_synced_at":"2026-03-01T11:03:49.142Z","repository":{"id":12319148,"uuid":"14955017","full_name":"jonasbn/perl-critic-policy-logiclab-requireversionformat","owner":"jonasbn","description":"Perl::Critic::Policy::logicLAB::RequireVersionFormat - policy to handle format of version numbers","archived":false,"fork":false,"pushed_at":"2025-04-28T08:58:15.000Z","size":1703,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T02:36:58.675Z","etag":null,"topics":["hacktoberfest","perl","perl-critic","perl5","policy"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonasbn.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null}},"created_at":"2013-12-05T14:02:20.000Z","updated_at":"2025-04-28T08:57:36.000Z","dependencies_parsed_at":"2025-12-20T07:01:25.079Z","dependency_job_id":null,"html_url":"https://github.com/jonasbn/perl-critic-policy-logiclab-requireversionformat","commit_stats":{"total_commits":105,"total_committers":4,"mean_commits":26.25,"dds":0.6,"last_synced_commit":"40ddc151c6bb78377282bcdf444da85ba16cb6fb"},"previous_names":["jonasbn/pcpmrvf"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jonasbn/perl-critic-policy-logiclab-requireversionformat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fperl-critic-policy-logiclab-requireversionformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fperl-critic-policy-logiclab-requireversionformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fperl-critic-policy-logiclab-requireversionformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fperl-critic-policy-logiclab-requireversionformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/perl-critic-policy-logiclab-requireversionformat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fperl-critic-policy-logiclab-requireversionformat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29967932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T10:55:55.490Z","status":"ssl_error","status_checked_at":"2026-03-01T10:55:55.175Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hacktoberfest","perl","perl-critic","perl5","policy"],"created_at":"2024-11-08T09:38:49.863Z","updated_at":"2026-03-01T11:03:49.103Z","avatar_url":"https://github.com/jonasbn.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CPAN version](https://badge.fury.io/pl/Perl-Critic-Policy-logicLAB-RequireVersionFormat.svg)](http://badge.fury.io/pl/Perl-Critic-Policy-logicLAB-RequireVersionFormat)\n[![Build Status](https://travis-ci.org/jonasbn/pcpmrvf.svg?branch=master)](https://travis-ci.org/jonasbn/pcpmrvf)\n[![Coverage Status](https://coveralls.io/repos/jonasbn/pcpmrvf/badge.png)](https://coveralls.io/r/jonasbn/pcpmrvf)\n\n# NAME\n\nPerl::Critic::Policy::logicLAB::RequireVersionFormat - assert version number formats\n\n# AFFILIATION\n\nThis policy is part of [Perl::Critic::logicLAB](https://metacpan.org/pod/Perl%3A%3ACritic%3A%3AlogicLAB) distribution.\n\n# VERSION\n\nThis documentation describes version 0.05\n\n# DESCRIPTION\n\nThis policy asserts that a specified version number conforms to a specified\nformat.\n\nThe default format is the de facto format used on CPAN. X.X and X.X\\_X where X\nis an arbitrary integer, in the code this is expressed using the following\nregular expression:\n\n    \\A\\d+\\.\\d+(_\\d+)?\\z\n\nThe following example lines would adhere to this format:\n\n- 0.01, a regular release\n- 0.01\\_1, a developer release\n\nScope, quoting and representation does not matter. If the version specification\nis lazy please see [\"EXCEPTIONS\"](#exceptions).\n\nThe following example lines would not adhere to this format and would result in\na violation.\n\n- our ($VERSION) = '$Revision$' =~ m{ \\\\$Revision: \\\\s+ (\\\\S+) }x;\n- $VERSION = '0.0.1';\n- $MyPackage::VERSION = 1.0.61;\n- use version; our $VERSION = qv(1.0.611);\n- $VERSION = \"0.01a\";\n\nIn addition to the above examples, there are variations in quoting etc. all\nwould cause a violation.\n\n## EXCEPTIONS\n\nIn addition there are some special cases, were we simply ignore the version,\nsince we cannot assert it in a reasonable manner.\n\n- our $VERSION = $Other::VERSION;\n\n    We hope that $Other::VERSION conforms where defined, so we ignore for now.\n\n# CONFIGURATION AND ENVIRONMENT\n\n## strict\\_quotes\n\nStrict quotes is off by default.\n\nStrict quotes enforces that you version number must be quoted, like so:\n'0.01' and \"0.01\". 0.01 would in this case cause a violation. This\nwould also go for any additional formats you could configure as valid using\nthe [\"formats\"](#formats) parameter below.\n\n    [logicLAB::RequireVersionFormat]\n    strict_quotes = 1\n\n## ignore\\_quotes\n\nIgnore quotes is on by default.\n\n0.01, '0.01' and \"0.01\" would be interpreted as the same.\n\nDisabling ignore quotes, would mean that: '0.01' and \"0.01\" would violate the\ndefault format since quotes are not specified as part of the pattern. This\nwould also go for any additional formats you could configure as valid using\nthe [\"formats\"](#formats) parameter below.\n\n    [logicLAB::RequireVersionFormat]\n    ignore_quotes = 0\n\n## formats\n\nIf no formats are specified, the policy only enforces the default format\nmentioned in [\"DESCRIPTION\"](#description) in combination with the above two configuration\nparameters of course.\n\n    [logicLAB::RequireVersionFormat]\n    formats = \\A\\d+\\.\\d+(_\\d+)?\\z || \\Av\\d+\\.\\d+\\.\\d+\\z\n\n# DEPENDENCIES AND REQUIREMENTS\n\n- [Perl::Critic](https://metacpan.org/pod/Perl%3A%3ACritic)\n- [Perl::Critic::Utils](https://metacpan.org/pod/Perl%3A%3ACritic%3A%3AUtils)\n- [Readonly](https://metacpan.org/pod/Readonly)\n- [Test::More](https://metacpan.org/pod/Test%3A%3AMore)\n- [Test::Perl::Critic](https://metacpan.org/pod/Test%3A%3APerl%3A%3ACritic)\n\n# INCOMPATIBILITIES\n\nThis distribution has no known incompatibilities.\n\n# BUGS AND LIMITATIONS\n\nI think it would be a good idea to ignore this particular version string and versions thereof:\n\n    our ($VERSION) = '$Revision$' =~ m{ \\$Revision: \\s+ (\\S+) }x;\n\nI am however still undecided.\n\n# BUG REPORTING\n\nPlease use Request Tracker for bug reporting:\n\n        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Critic-logicLAB-Prohibit-RequireVersionFormat\n\n# TEST AND QUALITY\n\nThe following policies have been disabled for this distribution\n\n- [Perl::Crititc::Policy::ValuesAndExpressions::ProhibitConstantPragma](https://metacpan.org/pod/Perl%3A%3ACrititc%3A%3APolicy%3A%3AValuesAndExpressions%3A%3AProhibitConstantPragma)\n- [Perl::Crititc::Policy::NamingConventions::Capitalization](https://metacpan.org/pod/Perl%3A%3ACrititc%3A%3APolicy%3A%3ANamingConventions%3A%3ACapitalization)\n\n## TEST COVERAGE\n\n    ---------------------------- ------ ------ ------ ------ ------ ------ ------\n    File                           stmt   bran   cond    sub    pod   time  total\n    ---------------------------- ------ ------ ------ ------ ------ ------ ------\n    ...B/RequireVersionFormat.pm   97.9   75.0   68.2  100.0  100.0  100.0   89.8\n    Total                          97.9   75.0   68.2  100.0  100.0  100.0   89.8\n    ---------------------------- ------ ------ ------ ------ ------ ------ ------\n\n# TODO\n\n- I would like to integrate the features of this policy into [Perl::Critic::Policy::Modules::RequireVersionVar](https://metacpan.org/pod/Perl%3A%3ACritic%3A%3APolicy%3A%3AModules%3A%3ARequireVersionVar), but I was aiming for a proof of concept first - so this planned patch is still in the pipeline.\n- Address the limitation listed in [\"BUGS AND LIMITATIONS\"](#bugs-and-limitations).\n\n# SEE ALSO\n\n- [http://logiclab.jira.com/wiki/display/OPEN/Versioning](http://logiclab.jira.com/wiki/display/OPEN/Versioning)\n- [version](https://metacpan.org/pod/version)\n- [http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/Modules/RequireVersionVar.pm](http://search.cpan.org/dist/Perl-Critic/lib/Perl/Critic/Policy/Modules/RequireVersionVar.pm)\n\n# AUTHOR\n\n- Jonas B. (jonasbn) `\u003cjonasbn@cpan.org\u003e`\n\n# LICENSE AND COPYRIGHT\n\nCopyright (c) 2009-2019 Jonas B. (jonasbn) All rights reserved.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fperl-critic-policy-logiclab-requireversionformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fperl-critic-policy-logiclab-requireversionformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fperl-critic-policy-logiclab-requireversionformat/lists"}