No::OrgNr - Utility functions for Norwegian organizations' ID numbers
This document describes No::OrgNr version 0.9.3
use No::OrgNr qw/domain2orgnr num_domains orgnr2domains orgnr_ok/;
use No::OrgNr qw/:all/;
my $owner = domain2orgnr('google.no'); # Returns "988588261", as seen by Whois
my $num = num_domains(ORG_NR); # Returns the number of domain names owned by ORG_NR
my $orgnr = orgnr_ok('988588261'); # Returns "988 588 261"
my @domains = orgnr2domains(ORG_NR); # Returns a list of domain names owned by ORG_NR
Organizations in Norway have a 9-digit number for identification. Valid numbers start on 8 or 9. No information about the given organization can be derived from the number.
This module contains utility functions for handling these numbers.
Please keep in mind that this module utilizes the module Net::Whois::Norid, which in turn uses the server whois.norid.no. This server has a limitation for the number of requests. See documentation at https://www.norid.no/en/registrar/system/tjenester/whois-das-service/.
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 have ID numbers as well. See https://en.wikipedia.org/wiki/VAT_identification_number.
Nothing is exported by default. See "SYNOPSIS" above.
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.
The function returns the number of domain names owned by organization number ORG_NR. The value is zero if no such domain name exists.
The function returns a sorted 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.
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.
This module requires Perl 5.14 or later, due to the "/a" regular expression modifier.
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.
Please report bugs using GitHub.
Documentation for this module is available using the following command:
The following sites may be useful:
CPAN Dependencies: http://deps.cpantesters.org/?module=No%3A%3AOrgNr
CPAN Ratings: http://cpanratings.perl.org/dist/No::OrgNr
CPAN Search: http://search.cpan.org/perldoc?No::OrgNr
CPAN Testers Matrix: http://matrix.cpantesters.org/?dist=No-OrgNr
CPAN Testers Reports: http://www.cpantesters.org/distro/N/No-OrgNr.html
CPANTS (CPAN Testing Service): http://cpants.cpanauthors.org/dist/No-OrgNr
Geir Myklebust <email@example.com>
No::OrgNr is Copyright (C) 2015, 2016, Geir Myklebust.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.14.0. For details, see GNU General Public License and Perl Artistic License.
This program is distributed in the hope that it will be useful, but it is provided "as is" and without any express or implied warranties.
To install No::OrgNr, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.