File Coverage

lib/Locale/Codes/Country.pm
Criterion Covered Total %
statement 34 34 100.0
branch n/a
condition n/a
subroutine 21 21 100.0
pod 15 15 100.0
total 70 70 100.0


line stmt bran cond sub pod time code
1             package Locale::Codes::Country;
2             # Copyright (C) 2001 Canon Research Centre Europe (CRE).
3             # Copyright (C) 2002-2009 Neil Bowers
4             # Copyright (c) 2010-2023 Sullivan Beck
5             # This program is free software; you can redistribute it and/or modify it
6             # under the same terms as Perl itself.
7              
8             # This file was automatically generated. Any changes to this file will
9             # be lost the next time 'gen_mods' is run.
10             # Generated on: Tue Aug 29 10:59:57 EDT 2023
11              
12 1     1   5207 use strict;
  1         2  
  1         29  
13 1     1   4 use warnings;
  1         2  
  1         34  
14             require 5.006;
15 1     1   4 use Exporter qw(import);
  1         2  
  1         65  
16              
17             our($VERSION,@EXPORT);
18             $VERSION = '3.75';
19              
20             ################################################################################
21 1     1   819 use if $] >= 5.027007, 'deprecate';
  1         49  
  1         6  
22 1     1   550 use Locale::Codes;
  1         3  
  1         43  
23 1     1   7 use Locale::Codes::Constants;
  1         2  
  1         639  
24              
25             @EXPORT = qw(
26             code2country
27             code2countrys
28             country2code
29             all_country_codes
30             all_country_names
31             country_code2code
32             );
33             push(@EXPORT,@Locale::Codes::Constants::CONSTANTS_COUNTRY);
34              
35             our $obj = new Locale::Codes('country');
36             $obj->show_errors(0);
37              
38             sub show_errors {
39 1     1 1 108 my($val) = @_;
40 1         4 $obj->show_errors($val);
41             }
42              
43             sub code2country {
44 75     75 1 13216 return $obj->code2name(@_);
45             }
46              
47             sub code2countrys {
48 1     1 1 196 return $obj->code2names(@_);
49             }
50              
51             sub country2code {
52 67     67 1 175934 return $obj->name2code(@_);
53             }
54              
55             sub country_code2code {
56 17     17 1 3342 return $obj->code2code(@_);
57             }
58              
59             sub all_country_codes {
60 3     3 1 679 return $obj->all_codes(@_);
61             }
62              
63             sub all_country_names {
64 3     3 1 677 return $obj->all_names(@_);
65             }
66              
67             sub rename_country {
68 7     7 1 1296 return $obj->rename_code(@_);
69             }
70              
71             sub add_country {
72 13     13 1 2353 return $obj->add_code(@_);
73             }
74              
75             sub delete_country {
76 5     5 1 883 return $obj->delete_code(@_);
77             }
78              
79             sub add_country_alias {
80 6     6 1 1139 return $obj->add_alias(@_);
81             }
82              
83             sub delete_country_alias {
84 6     6 1 1088 return $obj->delete_alias(@_);
85             }
86              
87             sub rename_country_code {
88 7     7 1 1224 return $obj->replace_code(@_);
89             }
90              
91             sub add_country_code_alias {
92 7     7 1 1293 return $obj->add_code_alias(@_);
93             }
94              
95             sub delete_country_code_alias {
96 5     5 1 986 return $obj->delete_code_alias(@_);
97             }
98              
99             1;