NAME
No::OrgNr - Utility functions for Norwegian organizations' ID numbers
VERSION
This document describes No::OrgNr version 0.5.0
SYNOPSIS
use No::OrgNr qw/domain2orgnr orgnr2domains orgnr_ok/;
# or
use No::OrgNr qw/:all/;
my $owner = domain2orgnr('google.no'); # Returns "988588261", as seen by Whois
my $test = orgnr_ok('988588261'); # Returns "988 588 261"
my @domains = orgnr2domains(ORG_NR); # Returns a list of domain names owned by ORG_NR
DESCRIPTION
Organizations in Norway have a 9-digit number for identification. Valid numbers start with 8 or 9. No information about the given organization can be derived from the number.
This module contains utility functions for handling these numbers. Domain names owned by Norwegian organizations can also be listed, given their organization number.
The Norwegian term for organization number is "organisasjonsnummer". See https://no.wikipedia.org/wiki/Organisasjonsnummer for a description (Norwegian text only).
Organizations in other countries also have ID numbers. See https://en.wikipedia.org/wiki/VAT_identification_number.
SUBROUTINES/METHODS
Nothing is exported by default. See "SYNOPSIS" above.
domain2orgnr(DOMAIN_NAME)
The function returns the organization number for the owner of DOMAIN_NAME
. Only Norwegian domain names (*.no) are supported. If no organization number can be found, the undefined value is returned.
orgnr2domains(ORG_NR)
The function returns a list of domain names (if any) owned by organization number ORG_NR
. If ORG_NR
is missing or invalid, or the organization does not own a domain name, an empty list is returned.
orgnr_ok(ORG_NR)
The function returns false if ORG_NR
is invalid. Otherwise, it returns the number in standard form, e.g., "987 654 321", which of course is a true value. A valid number is not necessarily used by any real organization.
DIAGNOSTICS
None.
CONFIGURATION AND ENVIRONMENT
None.
DEPENDENCIES
This module requires Perl 5.14 or later, due to the "/a" regex modifier.
INCOMPATIBILITIES
None reported.
SEE ALSO
The modules No::KontoNr and No::PersonNr, written by another CPAN author, may be of interest for validation purposes. The documentation for these modules is in Norwegian only.
BUGS
Please report bugs using GitHub.
SUPPORT
Documentation for this module is available using the perldoc command:
perldoc No::OrgNr
AUTHOR
Geir Myklebust <geirmy@gmail.com>
COPYRIGHT AND LICENSE
Copyright 2015 Geir Myklebust <geirmy@gmail.com>
.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See Perl Artistic License.