NAME
Class::Business::DK::FI - class for Danish FI numbers
VERSION
The documentation describes version 0.09
SYNOPSIS
use Class::Business::DK::FI;
my $FI = Class::Business::DK::FI->new('026840149965328');
#accessors
my $fi_number = $FI->number();
my $fi_number = $FI->get_number();
#mutators
my $fi_number = $FI->number('026840149965328')
or die "Unable to set number\n";
my $fi_number = $FI->get_number('026840149965328')
or die "Unable to set number\n";
DESCRIPTION
This is an OOP implementation for handling FI numbers. The class gives you an FI number object, which is validated according to the FI specification, see: Business::DK::FI.
SUBROUTINES AND METHODS
new
Constructor, takes a single parameter a valid FI number, object construction is only successful if the number is valid.
If the provided number is invalid, the construction attempt results in a die
.
number
Accessor to get the FI number for a given Class::Business::DK::FI object, see also: "get_number".
get_number
Accessor to get the FI assigned to a FI object.
set_number
Mutator taking a single argument a 16 digit FI number. The number should be valid. If not the method dies.
DIAGNOSTICS
All methods die if their API is not respected. Method calls can with success be wrapped in Try::Tiny or eval
blocks.
You must provide a FI number, thrown by "set_number" and "new" if no argument is provided.
Invalid FI number parameter, thrown by "new" and "set_number" if the provided argument is not a valid FI number.
CONFIGURATION AND ENVIRONMENT
The module requires no special configuration or environment.
DEPENDENCIES
INCOMPATIBILITIES
The module has no known incompatibilities.
BUGS AND LIMITATIONS
This module has no known bugs or limitations.
TEST AND QUALITY
TEST COVERAGE
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
blib/lib/Business/DK/FI.pm 100.0 100.0 n/a 100.0 100.0 35.1 100.0
...b/Class/Business/DK/FI.pm 100.0 100.0 66.7 100.0 100.0 64.9 98.4
Total 100.0 100.0 66.7 100.0 100.0 100.0 99.3
---------------------------- ------ ------ ------ ------ ------ ------ ------
QUALITY AND CODING STANDARD
The code passes Perl::Critic tests at severity 1 (brutal) with a set of policies disabled. please see t/perlcriticrc and the list below:
Perl::Critic::Policy::Variables::ProhibitUnusedVariables, required due to Class::InsideOut implementation
Perl::Critic::Policy::Subroutines::RequireFinalReturn, implementation is kept compact so some
return
statements have been left out
BUG REPORTING
Please report issues via CPAN RT:
or by sending mail to
<bug-Business-DK-FI@rt.cpan.org>
TODO
Please see the distribution TODO file also and the distribution road map at: http://logiclab.jira.com/browse/BDKFI#selectedTab=com.atlassian.jira.plugin.system.project%3Aroadmap-panel
SEE ALSO
AUTHOR
Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>
COPYRIGHT
Business-DK-FI and related is (C) by Jonas B. Nielsen, (jonasbn) 2009-2016
LICENSE
Business-DK-FI and related is released under the Artistic License 2.0
See the included license file for details