{"id":18909998,"url":"https://github.com/jonasbn/bdkfi","last_synced_at":"2026-03-07T12:30:24.088Z","repository":{"id":56835393,"uuid":"14954047","full_name":"jonasbn/bdkfi","owner":"jonasbn","description":"Business::DK::FI - validation of Danish FI numbers","archived":false,"fork":false,"pushed_at":"2019-09-25T19:11:09.000Z","size":92,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T05:27:19.514Z","etag":null,"topics":["hacktoberfest","perl","perl5"],"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.mkdn","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}},"created_at":"2013-12-05T13:22:19.000Z","updated_at":"2022-10-01T07:07:21.000Z","dependencies_parsed_at":"2022-09-09T18:00:47.903Z","dependency_job_id":null,"html_url":"https://github.com/jonasbn/bdkfi","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbdkfi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbdkfi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbdkfi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonasbn%2Fbdkfi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonasbn","download_url":"https://codeload.github.com/jonasbn/bdkfi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239898462,"owners_count":19715212,"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":["hacktoberfest","perl","perl5"],"created_at":"2024-11-08T09:38:55.620Z","updated_at":"2025-02-20T19:18:26.295Z","avatar_url":"https://github.com/jonasbn.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CPAN version](https://badge.fury.io/pl/Business-DK-FI.svg)](http://badge.fury.io/pl/Business-DK-FI)\n[![Build Status](https://travis-ci.org/jonasbn/bdkfi.svg?branch=master)](https://travis-ci.org/jonasbn/bdkfi)\n[![Coverage Status](https://coveralls.io/repos/jonasbn/bdkfi/badge.png)](https://coveralls.io/r/jonasbn/bdkfi)\n\n# NAME\n\nBusiness::DK::FI - Danish FI number validator\n\n# VERSION\n\nThe documentation describes version 0.09\n\n# SYNOPSIS\n\n    use Business::DK::FI qw(validate validateFI generate);\n\n    if (validate('026840149965328')) {\n        print \"026840149965328 is valid\\n\";\n    }\n\n\n    my $fi_number = generate(1);\n\n    if ($fi_number eq '000000000000018') {\n        print \"we have a FI number\\n\";\n    }\n\n# DESCRIPTION\n\nFI numbers are numbers used on GIRO payment forms. These can be used to do\nonline payments in banks or at in physical banks or post offices.\n\nThe module currently only supports FI numbers in the following series:\n\n- 71\n- 75\n\n# SUBROUTINES AND METHODS\n\n## validate\n\nTakes a single argument. 15 digit FI number. Returns true (1) or false (0)\nindicating whether the provided parameter adheres to specification.\n\n## validateFI\n\nLess intrusive exported variation of [\"validate\"](#validate). It is actually [\"validate\"](#validate)\nwhich is wrapping [\"validateFI\"](#validatefi).\n\n## generate\n\nSimple FI generation method. Takes an arbitrary number adhering to the following requirements: \n\n- length between 1 and 14\n- value between 1 and 99999999999999\n\nReturns a valid FI number.\n\n## PRIVATE SUBROUTINES AND METHODS\n\n## \\_calculate\\_checksum\n\nThis method calculates a checksum, it takes a single number as parameter and returns the calculated checksum.\n\n## \\_calculate\\_sum\n\nThis method calculates a sum it takes a number and a reference to an array of control cifers. It calculates a single sum based on the number and the control cifer and returns this.\n\n# DIAGNOSTICS\n\nAll methods **die** if their API is not respected. Method calls can with success be wrapped in [Try::Tiny](https://metacpan.org/pod/Try::Tiny) or `eval` blocks.\n\n# CONFIGURATION AND ENVIRONMENT\n\nThe module requires no special configuration or environment.\n\n# DEPENDENCIES\n\n- [Params::Validate](https://metacpan.org/pod/Params::Validate)\n- [Readonly](https://metacpan.org/pod/Readonly)\n- [Exporter](https://metacpan.org/pod/Exporter)\n- [English](https://metacpan.org/pod/English)\n\n# BUGS AND LIMITATIONS\n\nThis module has no known bugs or limitations.\n\n# BUG REPORTING\n\nPlease report issues via CPAN RT:\n\n- [http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-DK-FI](http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-DK-FI)\n\nor by sending mail to\n\n- `\u003cbug-Business-DK-FI@rt.cpan.org\u003e`\n\n# TEST AND QUALITY\n\n## TEST COVERAGE\n\n    ---------------------------- ------ ------ ------ ------ ------ ------ ------\n    File                           stmt   bran   cond    sub    pod   time  total\n    ---------------------------- ------ ------ ------ ------ ------ ------ ------\n    blib/lib/Business/DK/FI.pm    100.0  100.0    n/a  100.0  100.0   34.8  100.0\n    ...b/Class/Business/DK/FI.pm   97.6   83.3    n/a  100.0  100.0   65.2   96.9\n    Total                          99.1   90.0    n/a  100.0  100.0  100.0   98.7\n    ---------------------------- ------ ------ ------ ------ ------ ------ ------\n\n# QUALITY AND CODING STANDARD\n\nThe code passes [Perl::Critic](https://metacpan.org/pod/Perl::Critic) tests at severity 1 (_brutal_) with a set of policies disabled. please see `t/perlcriticrc` and the list below:\n\n- [Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma](https://metacpan.org/pod/Perl::Critic::Policy::ValuesAndExpressions::ProhibitConstantPragma), please\nsee: [http://logiclab.jira.com/wiki/display/OPEN/Perl-Critic-Policy-ValuesAndExpressions-ProhibitConstantPragma](http://logiclab.jira.com/wiki/display/OPEN/Perl-Critic-Policy-ValuesAndExpressions-ProhibitConstantPragma)\n- [Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText](https://metacpan.org/pod/Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText), this\nis listed in the [\"TODO\"](#todo) it requires numerous changes to the distribution POD.\n- [Perl::Critic::Policy::NamingConventions::Capitalization](https://metacpan.org/pod/Perl::Critic::Policy::NamingConventions::Capitalization), [\"validateFI\"](#validatefi) is exported both as [\"validateFI\"](#validatefi) and [\"validate\"](#validate) and **FI** is our used acronym\nso we try to stick to this\n- [Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops](https://metacpan.org/pod/Perl::Critic::Policy::ControlStructures::ProhibitCStyleForLoops), this\nis for the main algorithm, it was easier to do with a **C-style for loop**\n- [Perl::Critic::Policy::Subroutines::RequireArgUnpacking](https://metacpan.org/pod/Perl::Critic::Policy::Subroutines::RequireArgUnpacking), this is due to\nthe way: [Params::Validate](https://metacpan.org/pod/Params::Validate) is used\n- [Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers](https://metacpan.org/pod/Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers), we\nuse long control numbers\n- [Perl::Critic:.:Policy::Variables::ProhibitPunctuationVars](https://metacpan.org/pod/Perl::Critic:.:Policy::Variables::ProhibitPunctuationVars)\n\n# TODO\n\nPlease see the distribution `TODO` file also and the distribution road map at:\n    [http://logiclab.jira.com/browse/BDKFI#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel](http://logiclab.jira.com/browse/BDKFI#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel)\n\n# SEE ALSO\n\n- http://www.pbs.dk/\n- [Try::Tiny](https://metacpan.org/pod/Try::Tiny)\n- [Business::DK::CVR](https://metacpan.org/pod/Business::DK::CVR)\n- [Business::DK::CPR](https://metacpan.org/pod/Business::DK::CPR)\n- [Business::DK::PO](https://metacpan.org/pod/Business::DK::PO)\n- [Business::DK::Postalcode](https://metacpan.org/pod/Business::DK::Postalcode)\n- [Business::DK::Phonenumber](https://metacpan.org/pod/Business::DK::Phonenumber)\n\n# AUTHOR\n\nJonas B. Nielsen, (jonasbn) - `\u003cjonasbn@cpan.org\u003e`\n\n# COPYRIGHT\n\nBusiness-DK-FI and related is (C) by Jonas B. Nielsen, (jonasbn) 2009-2016\n\n# LICENSE\n\nBusiness-DK-FI and related is released under the Artistic License 2.0\n\nSee the included license file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fbdkfi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonasbn%2Fbdkfi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonasbn%2Fbdkfi/lists"}