Class::Business::DK::CPR - Danish CPR number class


Business-DK-CPR documentation  | view source Contained in the Business-DK-CPR distribution.

Index


NAME

Top

Class::Business::DK::CPR - Danish CPR number class

VERSION

Top

The documentation describes version 0.01 of Class::Business::DK::CPR

SYNOPSIS

Top

    use Class::Business::DK::CPR;

    my $cvr = Class::Business::DK::CPR->new(1501729473);

DESCRIPTION

Top

This is an OOP implementation for handling Danish CPR numbers. The class gives you an CPR object, which is validated according to the CPR specification, see: Business::DK::CPR.

SUBROUTINES AND METHODS

Top

new

This is the constructor, it takes a single mandatory parameter, which should be a valid CPR number, if the parameter provided is not valid, the constructor dies.

get_number

This method/accessor returns the CPR number associated with the object.

number

Alias for the get_number accessor, see above.

set_number

This method/mutator sets the a CPR number for a given CPR object, it takes a single mandatory parameter, which should be a valid CPR number, returns true (1) upon success else it dies.

algorithm

Accessor returning a string representing what algorithms used to validate the CPR object.

get_algorithm

See algorithm

gender

Accessor returning an integer representing the gender indicated by the CPR object.

* 1, male
* 1, female

get_gender

See gender

DIAGNOSTICS

Top

* You must provide a CPR number, thrown by set_number and new if no argument is provided.
* Invalid CPR number parameter, thrown by new and set_number if the provided argument is not a valid CPR number.

CONFIGURATION AND ENVIRONMENT

Top

The module requires no special configuration or environment to run.

DEPENDENCIES

Top

* Class::InsideOut
* Business::DK::CPR

INCOMPATIBILITIES

Top

The module has no known incompatibilities.

BUGS AND LIMITATIONS

Top

The module has no known bugs or limitations

TEST AND QUALITY

Top

Coverage of the test suite is at 98.3%

TODO

Top

* Please refer to the TODO file

SEE ALSO

Top

* Business::DK::CPR

BUG REPORTING

Top

Please report issues via CPAN RT:

  http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-DK-CPR

or by sending mail to

  bug-Business-DK-CPR@rt.cpan.org

AUTHOR

Top

Jonas B. Nielsen, (jonasbn) - <jonasbn@cpan.org>

COPYRIGHT

Top

LICENSE

Top

Business-DK-CPR 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://www.perl.com/language/misc/Artistic.html).


Business-DK-CPR documentation  | view source Contained in the Business-DK-CPR distribution.