countryname.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 2 SCAR 12.0
CC
2
Cov
0%
is_valid
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.3
1 package CGI::Untaint::countryname;
2 use warnings;
3 use strict;
4 use Locale::Country();
5
6 use base 'CGI::Untaint::printable';
7
8 =over 4
9
10 =item is_valid
11
12 =back
13
14 =cut
15
16 sub is_valid {
17 my ( $self ) = @_;
18
19 # name in, name out
20 return Locale::Country::country2code( $self->value ) ? 1 : undef;
21 }
22
23 1;