Class::Business::DK::FI - class for Danish FI numbers
The documentation describes version 0.01
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";
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.
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.
die
Accessor to get the FI number for a given Class::Business::DK::FI object, see also: "get_number".
Accessor to get the FI assigned to a FI object.
Mutator taking a single argument a 16 digit FI number. The number should be valid. If not the method dies.
All methods die if their API is not respected. Method calls can with success be wrapped in Try::Tiny or eval blocks.
eval
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.
The module requires no special configuration or environment.
Class::InsideOut
Carp
English
Business::DK::FI
The module has no known incompatibilities.
This module has no known bugs or limitations.
---------------------------- ------ ------ ------ ------ ------ ------ ------ 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 ---------------------------- ------ ------ ------ ------ ------ ------ ------
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
return
Please report issues via CPAN RT:
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-DK-FI
or by sending mail to
<bug-Business-DK-FI@rt.cpan.org>
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
Try::Tiny
Business::DK::CVR
Business::DK::CPR
Business::DK::PO
Business::DK::Postalcode
Business::DK::Phonenumber
Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>
<jonasbn@cpan.org>
Business-DK-FI and related is (C) by Jonas B. Nielsen, (jonasbn) 2009-2011
Business-DK-FI and related is released under the artistic license
The distribution is licensed under the Artistic License, as specified by the Artistic file in the standard perl distribution (http://dev.perl.org/licenses/artistic.html).
To install Business::DK::FI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::DK::FI
CPAN shell
perl -MCPAN -e shell install Business::DK::FI
For more information on module installation, please visit the detailed CPAN module installation guide.